Repo.js icon indicating copy to clipboard operation
Repo.js copied to clipboard

Display a specific file only

Open raphaelbastide opened this issue 13 years ago • 8 comments

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?

raphaelbastide avatar Jul 02 '12 13:07 raphaelbastide

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.

darcyclarke avatar Jul 02 '12 15:07 darcyclarke

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.

raphaelbastide avatar Jul 02 '12 15:07 raphaelbastide

:+1:

ghost avatar Jul 04 '12 04:07 ghost

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

thomasklemm avatar Jul 06 '12 17:07 thomasklemm

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

ghost avatar Jul 06 '12 18:07 ghost

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

thomasklemm avatar Jul 07 '12 17:07 thomasklemm

@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.

ghost avatar Jul 07 '12 20:07 ghost

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.

thomasklemm avatar Jul 07 '12 20:07 thomasklemm