diff --git a/.gitignore b/.gitignore index 1a290362b..20bf3472c 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ node_modules/ latest_release.json .hugo_build.lock +*.tar.gz diff --git a/layouts/_default/sitemap.xml b/layouts/_default/sitemap.xml new file mode 100644 index 000000000..8dd70da7a --- /dev/null +++ b/layouts/_default/sitemap.xml @@ -0,0 +1,20 @@ +{{ printf "" | safeHTML }} + + {{ range .Site.AllPages }} + {{- if and (not .Params.sitemap_exclude) (not .Draft) }} + + {{ .Permalink }} + {{- if not .Lastmod.IsZero }} + {{ .Lastmod.Format "2006-01-02T15:04:05-07:00" | safeHTML }} + {{- end }} + {{- with .Sitemap.ChangeFreq }} + {{ . }} + {{- end }} + {{- if ge .Sitemap.Priority 0.0 }} + {{ .Sitemap.Priority }} + {{- end }} + + {{- end }} + {{ end }} +