Use GitHub as a blogging platform. Load remote content from GitHub and display it as part of a site. Free collaborative web publishing with Git.
Brought to you by TheNerdShow.com
This project has become part of FirstPage.
- Keep websites up to date
- Reduce duplicate work
- Better collaboration
- Track revision history
- Work offline, and locally
We developed several GitHub projects and synchronizing our website with README.md from each project became tiresome. Browsers routinely cache the result of AJAX queries for many hours anyway, unless instructed to do otherwise, so there is nothing wrong with having a website fetch markdown from GitHub or custom git server and convert it to HTML on demand. Then we had another thought. Why not serve even more content in markdown format?
Use GitBlog to display README.md from a GitHub project, or create entire websites on GitHub using their simplified markdown format. GitBlog is a simple js script that takes markdown files from GitHub and displays them on a website using marked.js. Start a GitHub project containing markdown files and use GitBlog to display them as web pages.
GitBlog takes a specially-crafted URL with a=author, p=project name, and f=file name containing markdown. Fill out this form and click submit for an example. Copy or bookmark the resulting page link, and add it to the sitemap or navigation bar.
GitHub Configuration author: project: (opt.) file:You may also enter the URL of local or remote markdown files.
Load Markdown File URL:#
Heading at start of page becomes the <title> tag.- The first sentence becomes the website description.
- Keywords tag is automatically generated from content word count.
- Google apparently indexes these automatically generated tags.
- Get GitBlog from GitHub
- Update marked.js.
- See that the latest marked.js is in the js folder of this project.
- Edit this README.md or replace with custom markdown.
- Edit navbar.html or use FirstPage to generate the menu.
- Copy this project to a web server.
You may test this project
- by running
python3 -m http.server&
- by running
php -S addr:port&
- with
webfsd -F -p 8000&
- using
ruby -run -ehttpd . -p8000&
- or with many other test servers.
Our script loads the remote content, displays it on a web page, and generates meta tags. It depends upon marked.js by Christopher Jeffrey to convert the GitHub style markdown to HTML. We also need something like Git to keep track of the version history. Git already exists and is stable. Why not use it?