diff options
| author | ivarlovlie <git@ivarlovlie.no> | 2022-12-11 20:46:58 +0100 |
|---|---|---|
| committer | ivarlovlie <git@ivarlovlie.no> | 2022-12-11 20:47:06 +0100 |
| commit | 6561771c435f9d9bed1589b5ed13d17aee0b7873 (patch) | |
| tree | 2c47e60fa4aaaa5bf1e151838ac197a61f4377cc /code/frontpage/layouts/_default/section.sitemap.xml | |
| parent | 8da37c77cae0c7f712a775e3996afd9d84b0f9af (diff) | |
| download | greatoffice-6561771c435f9d9bed1589b5ed13d17aee0b7873.tar.xz greatoffice-6561771c435f9d9bed1589b5ed13d17aee0b7873.zip | |
feat: Add frontpage
Diffstat (limited to 'code/frontpage/layouts/_default/section.sitemap.xml')
| -rw-r--r-- | code/frontpage/layouts/_default/section.sitemap.xml | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/code/frontpage/layouts/_default/section.sitemap.xml b/code/frontpage/layouts/_default/section.sitemap.xml new file mode 100644 index 0000000..701951d --- /dev/null +++ b/code/frontpage/layouts/_default/section.sitemap.xml @@ -0,0 +1,46 @@ +{{ 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 $i, $e := .Data.Pages -}} + {{ if ne .Params.sitemap_exclude true }} + <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="{{ .Lang }}" + href="{{ .Permalink }}" + />{{ end }} + <xhtml:link + rel="alternate" + hreflang="{{ .Lang }}" + href="{{ .Permalink }}" + />{{ end }} + </url> + {{ end -}} + {{ end -}} + {{ range .Sections -}} + {{ range $i, $e := .Data.Pages -}} + {{ if ne .Params.sitemap_exclude true -}} + <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="{{ .Lang }}" + href="{{ .Permalink }}" + />{{ end }} + <xhtml:link + rel="alternate" + hreflang="{{ .Lang }}" + href="{{ .Permalink }}" + />{{ end }} + </url> + {{ end -}} + {{ end -}} + {{ end -}} +</urlset>
\ No newline at end of file |
