Skip to content

Commit a904e46

Browse files
Copilotyi-nuo426
andcommitted
Fix sitemap to include all individual pages (179 URLs vs 6)
Co-authored-by: yi-nuo426 <218099172+yi-nuo426@users.noreply.github.com>
1 parent 04db9f5 commit a904e46

File tree

4 files changed

+21
-0
lines changed

4 files changed

+21
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ node_modules/
88

99
latest_release.json
1010
.hugo_build.lock
11+
*.tar.gz
-23 MB
Binary file not shown.
-17.8 MB
Binary file not shown.

layouts/_default/sitemap.xml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{{ printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
2+
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
3+
xmlns:xhtml="http://www.w3.org/1999/xhtml">
4+
{{ range .Site.AllPages }}
5+
{{- if and (not .Params.sitemap_exclude) (not .Draft) }}
6+
<url>
7+
<loc>{{ .Permalink }}</loc>
8+
{{- if not .Lastmod.IsZero }}
9+
<lastmod>{{ .Lastmod.Format "2006-01-02T15:04:05-07:00" | safeHTML }}</lastmod>
10+
{{- end }}
11+
{{- with .Sitemap.ChangeFreq }}
12+
<changefreq>{{ . }}</changefreq>
13+
{{- end }}
14+
{{- if ge .Sitemap.Priority 0.0 }}
15+
<priority>{{ .Sitemap.Priority }}</priority>
16+
{{- end }}
17+
</url>
18+
{{- end }}
19+
{{ end }}
20+
</urlset>

0 commit comments

Comments
 (0)