layouts: fix rss and sitemap generation

This commit is contained in:
liushuyu 2021-06-10 13:40:06 -06:00
parent 380c9bcf50
commit ac99804480
No known key found for this signature in database
GPG key ID: 23D1CE4534419437
2 changed files with 2 additions and 4 deletions

View file

@ -6,7 +6,7 @@
<author>Citra</author> <author>Citra</author>
<rights>Copyright (c) 2017, Citra; all rights reserved.</rights> <rights>Copyright (c) 2017, Citra; all rights reserved.</rights>
<updated>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 MST" }}</updated> <updated>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 MST" }}</updated>
{{ range where .Data.Pages "Section" "entry" }} {{ range where .Site.RegularPages "Section" "entry" }}
<item> <item>
<title>{{ .Title }}</title> <title>{{ .Title }}</title>
<link>{{ .Permalink }}</link> <link>{{ .Permalink }}</link>
@ -18,4 +18,3 @@
{{ end }} {{ end }}
</channel> </channel>
</rss> </rss>

View file

@ -1,5 +1,5 @@
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1"> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">
{{ range .Data.Pages }} {{ range .Site.RegularPages }}
{{ if (eq .IsPage true) }} {{ if (eq .IsPage true) }}
{{ $rating := index .Site.Data.compatibility ( string .Params.compatibility | default "0" ) }} {{ $rating := index .Site.Data.compatibility ( string .Params.compatibility | default "0" ) }}
<url> <url>
@ -23,4 +23,3 @@
{{ end }} {{ end }}
{{ end }} {{ end }}
</urlset> </urlset>