Files
moonweb-site/shared/_includes/sitemap.njk
T
stefankoelle c76de3ec36 Fix sitemaps: add pathPrefix for subdirectory sites
- Add site.pathPrefix to infra, smarthome, code, retro configs
- Update shared sitemap template to use pathPrefix
- Hub has no prefix, subdirectories get /infra/, /smarthome/, etc.
2026-09-11 11:22:44 +02:00

14 lines
542 B
Plaintext

<?xml version="1.0" encoding="utf-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
{%- for page in collections.all %}
{%- if not page.url.includes("404") %}
<url>
<loc>{{ site.url }}{{ site.pathPrefix | default("") }}{{ page.url }}</loc>
<lastmod>{{ page.date | date }}</lastmod>
<changefreq>{% if page.url == "/" %}weekly{% else %}monthly{% endif %}</changefreq>
<priority>{% if page.url == "/" %}1.0{% elif parent %}0.8{% else %}0.7{% endif %}</priority>
</url>
{%- endif %}
{%- endfor %}
</urlset>