feat(sitemap): add XML styling (#221)

This commit is contained in:
Óscar Fernández
2023-11-14 23:26:44 +01:00
committed by GitHub
parent 741a7e7c6f
commit 1df3f7f89c
9 changed files with 190 additions and 4 deletions

12
templates/sitemap.xml Normal file
View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="{{ get_url(path='/sitemap_style.xsl', trailing_slash=false) | safe }}" type="text/xsl"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
{%- for sitemap_entry in entries %}
<url>
<loc>{{ sitemap_entry.permalink | escape_xml | safe }}</loc>
{%- if sitemap_entry.updated %}
<lastmod>{{ sitemap_entry.updated }}</lastmod>
{%- endif %}
</url>
{%- endfor %}
</urlset>