Commit 01e0074e authored by Joseph Walton-Rivers's avatar Joseph Walton-Rivers 🐦

if j2static provides site context, use it for generating the sitemap

parent b3792436
Pipeline #2382 passed with stages
in 48 seconds
......@@ -2,6 +2,16 @@
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
{% if site %}
{% for page in site.index %}
{% if page.suffix == '.html' %}
<url>
<loc>http://hanabi.fosslab.uk/{{ page }}</loc>
</url>
{% endif %}
{% endfor %}
{% else %}
<url>
<loc>http://hanabi.fosslab.uk/</loc>
</url>
......@@ -32,6 +42,7 @@
<url>
<loc>http://hanabi.fosslab.uk/builder.html</loc>
</url>
{% endif %}
</urlset>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment