fix: fix disqus feature and format

This commit is contained in:
Dillon ZENG
2019-08-02 16:16:59 +08:00
parent 3e2972c318
commit 1e709b5ba4
6 changed files with 121 additions and 145 deletions

View File

@@ -1,31 +1,22 @@
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xhtml="http://www.w3.org/1999/xhtml">
{{ range (where .Data.Pages "Section" "!=" "gallery") }}
<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 }}
{{ if .IsTranslated }}
{{ range .Translations }}
<xhtml:link
rel="alternate"
hreflang="{{ .Lang }}"
href="{{ .Permalink }}"
/>
{{ end }}
<xhtml:link
rel="alternate"
hreflang="{{ .Lang }}"
href="{{ .Permalink }}"
/>
{{ end }}
</url>
{{ end }}
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml">
{{ range (where .Data.Pages "Section" "!=" "gallery") }}
<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 }}
{{ if .IsTranslated }}
{{ range .Translations }}
<xhtml:link rel="alternate" hreflang="{{ .Lang }}" href="{{ .Permalink }}"/>
{{ end }}
<xhtml:link rel="alternate" hreflang="{{ .Lang }}" href="{{ .Permalink }}"/>
{{ end }}
</url>
{{ end }}
</urlset>