diff --git a/wowchemy/layouts/_default/sitemap.xml b/wowchemy/layouts/_default/sitemap.xml new file mode 100644 index 00000000..b5761c61 --- /dev/null +++ b/wowchemy/layouts/_default/sitemap.xml @@ -0,0 +1,30 @@ +{{ printf "" | safeHTML }} + + {{/* Check that page is built (has a URL) and is not private. */}} + {{ range where (where .Data.Pages "Permalink" "!=" nil) "Params.private" "ne" true }} + + {{ .Permalink }} + {{- if not .Lastmod.IsZero }}{{ safeHTML ( .Lastmod.Format "2006-01-02T15:04:05-07:00" ) }}{{ end }} + {{- with .Sitemap.ChangeFreq }}{{ . }}{{ end }} + {{- if ge .Sitemap.Priority 0.0 }}{{ .Sitemap.Priority }}{{ end }} + {{- if .IsTranslated -}} + + {{- range .Translations -}} + + {{- end -}} + + + + {{- end -}} + + {{- end -}} + diff --git a/wowchemy/layouts/partials/site_head.html b/wowchemy/layouts/partials/site_head.html index f937367a..03380828 100644 --- a/wowchemy/layouts/partials/site_head.html +++ b/wowchemy/layouts/partials/site_head.html @@ -8,6 +8,10 @@ {{ end }} + {{ if .Params.private }} + + {{- end -}} + {{ if site.Params.marketing.google_optimize | and hugo.IsProduction }} {{- end -}}