mirror of
https://git.sr.ht/~seirdy/seirdy.one
synced 2024-11-09 16:02:10 +00:00
Exclude custom 404 from sitemap
This commit is contained in:
parent
85d84910f8
commit
c3026ed9d8
2 changed files with 14 additions and 0 deletions
|
@ -4,6 +4,7 @@ outputs:
|
|||
url: "/404.html"
|
||||
title: "Error 404 (Not Found)"
|
||||
layout: "404"
|
||||
private: true
|
||||
---
|
||||
You have requested a page that was not found on this server.
|
||||
|
||||
|
|
13
layouts/_default/sitemap.xml
Normal file
13
layouts/_default/sitemap.xml
Normal file
|
@ -0,0 +1,13 @@
|
|||
{{- printf `<?xml version="1.0" encoding="utf-8" standalone="yes"?>` | safeHTML }}
|
||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
||||
{{- range .Data.Pages }}
|
||||
{{- if not .Params.private -}}
|
||||
<url>
|
||||
<loc>{{ .Permalink }}</loc>
|
||||
<lastmod>{{ safeHTML ( .Lastmod.Format "2006-01-02T15:04:05-07:00" ) }}</lastmod>{{ with .Sitemap.ChangeFreq }}
|
||||
<changefreq>{{ . }}</changefreq>{{ end }}{{ if ge .Sitemap.Priority 0.0 }}
|
||||
<priority>{{ .Sitemap.Priority }}</priority>{{ end }}
|
||||
</url>
|
||||
{{- end -}}
|
||||
{{- end }}
|
||||
</urlset>
|
Loading…
Reference in a new issue