My site will feature dozens and dozens of front end live demos ( html pages with cross browser bugs ), but instead of just throwing it on jsfiddle.net and linking to demos from articles I would actually like to store them in a database or organized dynamically generated flat files.
Example:
http://site/css-bug/
will feature an article on a certain bug in X browser. I can have many ( demos ) to one ( bug/article ). They will contain HTML, CSS and some Javascript.
Another possibility I was pondering about was making my own jsfiddle.net clone, and in doing so I would have to mimic the way jsfiddle stores them ( however it does ). I'm thinking this is the best route 开发者_JAVA百科to go, but would appreciate advice.
Background info:
As of now I am manually making static html files in directories and linking to them, and I am using Django for my application which links to these demos ( which reside on a media server ).
You can use jsFiddle for that.
To get the files locally you can get the parts of the saved fiddle using an undocumented API (this mean it may disappear and not be valid). Add /show_js/ or /show_html/ or /show_css/ to the end of the url.
You may wait some time until we will add export to gists on github (implementing this shouldn't take very long, but we want hit beta first).
To increase the speed of loading the example it would be great if you'd load the embedded version on demand. Display [Show example] button which will create an iframe with embedded fiddle. We plan to write cross-browser support for that as well.
精彩评论