Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit cbe4339

Browse files
committed
tpl: Simplify sitemap template
The benefit of my performance motivated construct in 6475d30 was most likely minimal and not worth the loss of clarity. See #14912
1 parent 6475d30 commit cbe4339

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tpl/tplimpl/embedded/templates/sitemap.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<loc>{{ .Permalink }}</loc>{{ if not .Lastmod.IsZero }}
99
<lastmod>{{ safeHTML ( .Lastmod.Format "2006-01-02T15:04:05-07:00" ) }}</lastmod>{{ end }}{{ with .Sitemap.ChangeFreq }}
1010
<changefreq>{{ . }}</changefreq>{{ end }}{{ if ge .Sitemap.Priority 0.0 }}
11-
<priority>{{ .Sitemap.Priority }}</priority>{{ end }}{{ $allTranslations := .AllTranslations }}{{ if gt ($allTranslations | len) 1 }}{{ range $allTranslations }}
11+
<priority>{{ .Sitemap.Priority }}</priority>{{ end }}{{ if .IsTranslated }}{{ range .AllTranslations }}
1212
<xhtml:link
1313
rel="alternate"
1414
hreflang="{{ .Language.Locale }}"

0 commit comments

Comments
 (0)