Improve hextra-starter-template: HUGO_VERSION Update and Multilanguage Sitemap Fix #634
Replies: 2 comments 2 replies
-
|
the first issue has been addressed can you elaborate more on the second one? |
Beta Was this translation helpful? Give feedback.
-
|
By default, a multilingual site's sitemap structure includes a main sitemap (e.g., However, the language-specific sitemaps are not generated correctly, as seen in the provided link.
To resolve this, I added a custom sitemap template at {{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
{{- range .Site.Pages }}
<url>
<loc>{{ .Permalink | absURL }}</loc>
<lastmod>{{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" }}</lastmod>
</url>
{{- end }}
</urlset>With this modification, the sitemap is now correctly generated. You can view the result at: |
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi @imfing,
When I used your excellent template, I made two changes to make it work more correctly:
Perhaps you should update your template to make it ready to use out of the box! 😉
Beta Was this translation helpful? Give feedback.
All reactions