aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2024-02-03 17:48:19 +0100
committerGuido Günther <agx@sigxcpu.org>2024-02-05 11:56:13 +0100
commit4b2f85fb4d4665160dd0bd959d6654c6b46a385c (patch)
tree722cfb0eae4a43b76f7f27c5d91b4ee5ecafc0cf
parent5048766202fb0507c15ed55a19d26b31c010ed19 (diff)
sitemap: Include tarballs
-rw-r--r--layouts/sitemap.xml31
1 files changed, 31 insertions, 0 deletions
diff --git a/layouts/sitemap.xml b/layouts/sitemap.xml
new file mode 100644
index 0000000..5e6ff6a
--- /dev/null
+++ b/layouts/sitemap.xml
@@ -0,0 +1,31 @@
+{{ printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
+<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
+ xmlns:xhtml="http://www.w3.org/1999/xhtml">
+ {{ range .Data.Pages }}
+ {{- if .Permalink -}}
+ <url>
+ <loc>{{ .Permalink }}</loc>{{ if not .Lastmod.IsZero }}
+ <lastmod>{{ safeHTML ( .Lastmod.Format "2006-01-02T15:04:05-07:00" ) }}</lastmod>{{ end }}{{ with .Sitemap.ChangeFreq }}
+ <changefreq>{{ . }}</changefreq>{{ end }}{{ if ge .Sitemap.Priority 0.0 }}
+ <priority>{{ .Sitemap.Priority }}</priority>{{ end }}{{ if .IsTranslated }}{{ range .Translations }}
+ <xhtml:link
+ rel="alternate"
+ hreflang="{{ .Language.LanguageCode }}"
+ href="{{ .Permalink }}"
+ />{{ end }}
+ <xhtml:link
+ rel="alternate"
+ hreflang="{{ .Language.LanguageCode }}"
+ href="{{ .Permalink }}"
+ />{{ end }}
+ </url>
+ {{- end -}}
+ {{ end }}
+
+ {{- $data := getCSV "," "https://sources.phosh.mobi/sitemap.csv" -}}
+ {{- range after 1 $data -}}
+ <url>
+ <loc>{{ index . 0 }}</loc>
+ </url>
+ {{- end -}}
+</urlset>