From f3417dd52f86389c00289e66aad0baa71d0a757d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Fri, 27 Jul 2018 15:07:59 +0200 Subject: [PATCH] Update sitemap-template.md --- content/en/templates/sitemap-template.md | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/content/en/templates/sitemap-template.md b/content/en/templates/sitemap-template.md index 0e721a412..3d49fb290 100644 --- a/content/en/templates/sitemap-template.md +++ b/content/en/templates/sitemap-template.md @@ -45,7 +45,7 @@ For multilingual sites, we also create a Sitemap index. You can provide a custom This template respects the version 0.9 of the [Sitemap Protocol](http://www.sitemaps.org/protocol.html). -``` +```xml {{ range .Pages }} @@ -65,6 +65,23 @@ on render. Please don't include this in the template as it's not valid HTML. `` {{% /note %}} +## Hugo's sitemapindex.xml + +This is used to create a Sitemap index in multilingual mode: + +```xml + + {{ range . }} + + {{ .SitemapAbsURL }} + {{ if not .LastChange.IsZero }} + {{ .LastChange.Format "2006-01-02T15:04:05-07:00" | safeHTML }} + {{ end }} + + {{ end }} + +``` + ## Configure `sitemap.xml` Defaults for ``, `` and `filename` values can be set in the site's config file, e.g.: