5 ms·
Repo.js
- tzaman 14y agoNice, although not very useful - i'd recommend at least having clone URL and view raw option (if possible)
- drivebyacct2 14y agoI'm not sure what I would use this for, but it is neat. I would recommend allowing one to set a max height. It's rather impractical to have a 200px tall box turn into an enormous box with 500 lines of CSS.
- Argorak 14y agoI was looking for something like this for quite a while. From time to time, I want to write about code organization, but always struggle on how to present that. Being able to embed a Github repo in a post seems like a great way of doing that. Its not like I would embed the repo of an actual, big project.
- cvrajeesh 14y agoI believe GitHub Api has got max request limits, how you are going to handle this?
- thecodemonkey 14y agoIt shouldn't be a problem as all requests are handled client side
- cvrajeesh 14y agoOn a corporate environment, all the outbound requests will be from one proxy, which could eat the request/ip rate very easily.
- Joe8Bit 14y agoI was going to do something very similar to this, so thanks for saving me the effort! :) I already built a couple Github jQuery widgets that people in this thread might also find relevant: http://www.joepettersson.com/demo/pretty-gist/ http://www.joepettersson.com/demo/pretty-gist/ http://www.joepettersson.com/demo/jquery-github-widget/ http://www.joepettersson.com/demo/jquery-github-widget/
- jameswyse 14y agoThis looks very handy, thanks! I can see this being useful in tutorial articles to allow the user to see all the code involved at once.
- termit 14y agoAwesome, I like it!
- Ygg2 14y agoIs there any way to return from file preview? Like for example if I click README.txt and I want to go back to see the rest of code.
- stayclassytally 14y agoYou can click the Repo title again to return to the root, or the '..' if you're inside a folder.
- Ygg2 14y agoWeird. Sometimes it works, other times it's just a blank page. It's still an elegant piece of code.
- jlward4th 14y agoI built a little JS library that just does that part: http://www.jamesward.com/2012/06/15/dynamically-rendering-github-files http://www.jamesward.com/2012/06/15/dynamically-rendering-gi...
- landhar 14y agoWhen clicking on a file to preview it, you should append the name of the file to the bread crumbs, to show that you can go back to the listing by clicking back on the repo name. It took me a while to figure that out.
- napillo 14y agoThat's strange. When I click a file, then click on the repo name, it just blanks the whole section out.
- techtrainer 14y agoVery nice. Thank you.