X-Git-Url: https://git.phdru.name/?p=phdru.name%2Fphdru.name.git;a=blobdiff_plain;f=gen-sitemap.py;h=088f83819e4c8d491fa0ac69e4eb8ab632c3cb06;hp=63b34a2ff5ce9af1df3e161410d56205de97d76b;hb=faa336e3b58a3a51edcfd5da191dc0dcdac3b2be;hpb=3585a5962c3299f55570ccedad76caf554b9c84e diff --git a/gen-sitemap.py b/gen-sitemap.py index 63b34a2..088f838 100755 --- a/gen-sitemap.py +++ b/gen-sitemap.py @@ -67,4 +67,20 @@ def _tree2html(tree, level=0): strings.append(indent + "") return '\n'.join(strings) -write_if_changed("sitemap.html", _tree2html(tree[1])) +sitemap_tmpl = ["""\ +#extends phd_site +#implements respond +#attr $Title = 'Sitemap' +#attr $Copyright = 2015 +## +#def body_html +"""] + +sitemap_tmpl.append(_tree2html(tree[1])) + +sitemap_tmpl.append(""" +#end def +$phd_site.respond(self) +""") + +write_if_changed("sitemap.tmpl", ''.join(sitemap_tmpl))