Merge pull request #46 from Junyi-99/feat-experimental-config
fix: fix the sitemap url
This commit is contained in:
commit
a860ae9764
@ -2,21 +2,21 @@
|
|||||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
|
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
|
||||||
xmlns:xhtml="http://www.w3.org/1999/xhtml">
|
xmlns:xhtml="http://www.w3.org/1999/xhtml">
|
||||||
{{ range where .Data.Pages "Params.hidden" "!=" true }}
|
{{ range where .Data.Pages "Params.hidden" "!=" true }}
|
||||||
{{- if .RelPermalink -}}
|
{{- if .Permalink -}}
|
||||||
<url>
|
<url>
|
||||||
<loc>{{ .RelPermalink }}</loc>{{ if not .Lastmod.IsZero }}
|
<loc>{{ .Permalink }}</loc>{{ if not .Lastmod.IsZero }}
|
||||||
<lastmod>{{ safeHTML ( .Lastmod.Format "2006-01-02T15:04:05-07:00" ) }}</lastmod>{{ end }}{{ with .Sitemap.ChangeFreq }}
|
<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 }}
|
<changefreq>{{ . }}</changefreq>{{ end }}{{ if ge .Sitemap.Priority 0.0 }}
|
||||||
<priority>{{ .Sitemap.Priority }}</priority>{{ end }}{{ if .IsTranslated }}{{ range .Translations }}
|
<priority>{{ .Sitemap.Priority }}</priority>{{ end }}{{ if .IsTranslated }}{{ range .Translations }}
|
||||||
<xhtml:link
|
<xhtml:link
|
||||||
rel="alternate"
|
rel="alternate"
|
||||||
hreflang="{{ .Language.LanguageCode }}"
|
hreflang="{{ .Language.LanguageCode }}"
|
||||||
href="{{ .RelPermalink }}"
|
href="{{ .Permalink }}"
|
||||||
/>{{ end }}
|
/>{{ end }}
|
||||||
<xhtml:link
|
<xhtml:link
|
||||||
rel="alternate"
|
rel="alternate"
|
||||||
hreflang="{{ .Language.LanguageCode }}"
|
hreflang="{{ .Language.LanguageCode }}"
|
||||||
href="{{ .RelPermalink }}"
|
href="{{ .Permalink }}"
|
||||||
/>{{ end }}
|
/>{{ end }}
|
||||||
</url>
|
</url>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
Loading…
Reference in New Issue
Block a user