Skip to main content

repo2site: Make a web site out of a git repo's MarkDown files

Tags:
Reading time: 1 minute Suggest a change

I've just finished the initial work on a script that will make a full-HTML website, driven by AJAX, out of the MarkDown (*.md) files in a git repository. It's currently geared toward GitHub, but could easily be adapted to other repository hosting services.

Check it out!

The problem I was trying to solve was that I wanted to build a web site for a GitHub project I was working on, and I realized that I was basically duplicating all of the content in the README.md file. This would have carried on even further, as the pages I wanted to link it up to would themselves be duplicates of other MarkDown files from the repository. So, repo2site works by using AJAX and markdown-js to dynamically build the site content from the MarkDown files themselves. When the MarkDown files get updated, so does your site. It uses JavaScript's history API in order to allow the use of forward/back browser buttons for seamless navigation.

If you've got a git repo with some MarkDown, and you want to make a web site out of it, look no further! (Or maybe look a little further, depending on how complex you want to get with it.)

To see a site making full use of repo2site, check out x84-extras.