Last Updated: February 25, 2016
·
5.03K
· hopsoft

Convert your README to a GitHub page

I love github pages, but maintaining your project's README independently of the github pages index.html page is a source of frustration.

I've remedied the problem with a simple script that syncs README.md from the master branch to the index.md on the gh-pages branch.

Here is how I publish a README.md to the styled project page.

$readme2ghpage

Easy huh?

readme2ghpage is a simple Ruby script that performs the following.

* Checkout the gh-pages branch
* Checkout the README.md file from master
* Convert the README.md to index.md
  * add Jekyll front matter
  * change backticks to Liquid extension for syntax
  * update headers so they are linkable
* Remove the README.md

Here's the script. https://gist.github.com/2967061

Enjoy!


I think Github should focus its gh-page themes on targeting Markdown output rather than generating HTML itself.

I'm looking forward to the time that Gitub has a solid solution for this.

1 Response
Add your response

Perhaps you could get your index.html to pull in and process the readme somehow. At least until GitHub targets the styling to Markdown output like you said.

over 1 year ago ·