From dfb6f218015439f2b570be13c184179918dd7764 Mon Sep 17 00:00:00 2001 From: Olivier Date: Fri, 19 Apr 2024 18:38:19 +0200 Subject: [PATCH] Upload files to "layouts" --- layouts/robots.txt | 2 ++ layouts/sitemap.xml | 25 +++++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 layouts/robots.txt create mode 100644 layouts/sitemap.xml diff --git a/layouts/robots.txt b/layouts/robots.txt new file mode 100644 index 0000000..a16ae9a --- /dev/null +++ b/layouts/robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Sitemap: {{ "sitemap.xml" | absLangURL }} diff --git a/layouts/sitemap.xml b/layouts/sitemap.xml new file mode 100644 index 0000000..d288092 --- /dev/null +++ b/layouts/sitemap.xml @@ -0,0 +1,25 @@ +{{ printf "" | safeHTML }} + + {{ range .Data.Pages }} + {{- if .Permalink -}} + + {{ .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 -}} + {{ end }} + +