sitemap generation
billryan opened this issue · comments
Sitemap.xml is an optimization for search engine. Gitbook does not provide sitemap support now. I have little knowledge about Javascript, so I wrote a sitemap generation helper with Python.
Implementation details
git ls-tree
andgit log
, we can get the files in git repo and its latest modified time.- filter
.md
source files and exclude/replace some special markdown files. - replace
.md
with.html
. - generate sitemap.xml with Jinja2 template
A better implementation fixed in GitbookIO/plugin-sitemap#3