+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))