mirror of
https://github.com/gcushen/hugo-academic.git
synced 2025-07-26 19:15:16 +02:00
fix: inclusion of null locs in sitemap.xml
Impacted by Hugo changes Fix #2732
This commit is contained in:
parent
d0aac60634
commit
d26624902d
1 changed files with 1 additions and 1 deletions
|
@ -2,7 +2,7 @@
|
|||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
|
||||
xmlns:xhtml="http://www.w3.org/1999/xhtml">
|
||||
{{/* Check that page is built (has a URL) and is not private. */}}
|
||||
{{ range where (where .Data.Pages "Permalink" "!=" nil) "Params.private" "ne" true }}
|
||||
{{ range where (where .Data.Pages "Permalink" "!=" "") "Params.private" "ne" true }}
|
||||
<url>
|
||||
<loc>{{ .Permalink }}</loc>
|
||||
{{- if not .Lastmod.IsZero }}<lastmod>{{ safeHTML ( .Lastmod.Format "2006-01-02T15:04:05-07:00" ) }}</lastmod>{{ end }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue