Here's what I came up with, in case someone is interested.
Typically I write HTML using Jade preprocessor, and luckily it does support GitHub Flavored Markdown which is the language README.md
is written in. So my steps where as following:
- Translate
index.html
generated by GH Pages to Jade. I used onlinehtml2jade
tool; - Save the output to
index.jade
; Locate
section
block in the resulting markup inindex.jade
and replace its entire content with:section include:md README.md
- Run
jade index.jade
which produces new, automatically generatedindex.html
; - Commit both files to
gh-pages
.
See example in this commit on GitHub.