Reputation: 103
Is there a way I can embed the code in a file present in github repository into a page of site being developed on node js.
Simplest I can think of is invoke a ajax call and pull the content into a dom element on the page.
Is there any other way out?
EDIT
Code on github is not nodejs code. A use case: I have ruby code committed and shared on github, now I want to refer that code on a site being created using nodejs.
Upvotes: 0
Views: 61
Reputation: 2134
Gist-it is your solution for it. A man named "Robert Krimen" is kind enough to create an application so that we can embed any file from github repository to our webpage/blog. You can do it as simple as in three steps, just like you embed a gist, hoping you are familiar with embedding gist.
Copy github url of the file you like to embed.
Submit it to Gist-it and copy the script tag generated.
Use the script tag copied in you blog, same as you use gist.
for further reference http://blog.revathskumar.com/2012/08/embed-files-from-github-repository-into-webpage.html
Upvotes: 1