HTML sitemap

Create a shortcode with your code layout/shortcodes/sitemap.html (I modified the code):

<ul>
{{ range site.RegularPages }}
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
{{ end }}
</ul>

Then create your sitemap page content/sitemap.md and insert the shortcode:

+++
title = "Sitemap"
+++

All the pages of my great site:

{{< sitemap >}}

And the text continues ;)
1 Like