mirror of
https://github.com/gcushen/hugo-academic.git
synced 2025-07-26 03:00:50 +02:00
Fix sitemap.xml (#91)
- Remove invalid homepage widget links generated by Hugo
This commit is contained in:
parent
69f7bf3592
commit
be0a98239d
1 changed files with 13 additions and 0 deletions
13
layouts/sitemap.xml
Normal file
13
layouts/sitemap.xml
Normal file
|
@ -0,0 +1,13 @@
|
|||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
||||
{{ range (where .Data.Pages "Section" "!=" "home") }}
|
||||
{{ $perm := add $.Site.LanguagePrefix "/home/" }}
|
||||
{{ if ne .RelPermalink $perm }}
|
||||
<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 }}
|
||||
</url>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</urlset>
|
Loading…
Add table
Add a link
Reference in a new issue