Replace static sitemap with dynamic template

This commit is contained in:
Ethan Paul 2021-04-24 22:34:43 -04:00
parent a0147fb576
commit 7191af48d0
No known key found for this signature in database
GPG Key ID: D0E2CBF1245E92BF
2 changed files with 27 additions and 16 deletions

View File

@ -1,16 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<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">
<!-- created with Free Online Sitemap Generator www.xml-sitemaps.com -->
<url>
<loc>https://allaroundhere.org/</loc>
<lastmod>2021-02-01T00:30:55+00:00</lastmod>
<priority>1.00</priority>
</url>
</urlset>

27
templates/sitemap.xml.j2 Normal file
View File

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- created with Free Online Sitemap Generator www.xml-sitemaps.com -->
<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">
<url>
<loc>https://allaroundhere.org/</loc>
<lastmod>2021-02-01T00:30:55+00:00</lastmod>
<priority>1.00</priority>
</url>
<url>
<loc>https://allaroundhere.org/explore/</loc>
<lastmod>2021-02-01T00:30:55+00:00</lastmod>
<priority>1.10</priority>
</url>
{% for post in config.posts %}
<url>
<loc>https://allaroundhere.org/explore/{{ post.slug }}/</loc>
<lastmod>2021-02-01T00:30:55+00:00</lastmod>
<priority>0.90</priority>
</url>
{% endfor %}
</urlset>