darcyclarke / Repo.js

:page_facing_up: A plugin to embed Github repos on your site
MIT License
911 stars 82 forks source link

Display a specific file only #5

Open raphaelbastide opened 12 years ago

raphaelbastide commented 12 years ago

Is single file display planned? If for example I want to display a README.md I think It can be interesting to create a GitHub powered website this way, what are your thoughts?

darcyclarke commented 12 years ago

Hey Raphael,

Appreciate the feedback. I'm going to set this as a feature request and get to work on some kind of implementation for sure. Right now you can view single files once you click on them but I think it would be cool to just showcase an individual file by default as well. Let me know if that's what you were thinking.

raphaelbastide commented 12 years ago

Nice, just for your information (and inspiration), here is a project of mine that needed to import a README, and some other files. That is why I am really interested by you project.

ghost commented 12 years ago

:+1:

thomasklemm commented 12 years ago

The Github API has an (I believe) fairly new call that will return any repo's Readme. (See Get a Readme (Github API).) If some specific headers are set in your request the API in HTML containing i.e. all the Syntax Highlighting that Github Flavoured Markdown offers.

@darcyclarke Great work on Repo.js. It would be great however if it would allow for embeding a Readme in rendered HTML instead of unrendered Markdown.

Background: I was looking for a way to embed a Readme in a project of mine, stumbled on Repo.js, and wrote a basic jQuery Plugin I extracted and called Readme.js.

Bye, Thomas

ghost commented 12 years ago

@thomasklemm that is good info, but I would still like the option to embed individual files other than the README

thomasklemm commented 12 years ago

@svnpenn Gist-It might be what you are looking for until Repo.js offers this feature.

ghost commented 12 years ago

@thomasklemm I have already created a ruby plugin that implements this functionality. I would prefer a Repo.js implementation over what I have written or some other Gist-it. Please stay on topic.

thomasklemm commented 12 years ago

Sure, just trying to help here with some related solutions I stumbled upon while searching for how to embed a Readme. There's nothing as powerful as Repo.js out there, and I sure would favour an implementation of this feature as well.