mirror of
https://github.com/nairobilug/pelican-alchemy.git
synced 2024-12-30 12:15:06 +01:00
Add sitemap support, https://github.com/getpelican/pelican/wiki/Tips-n-Tricks#generate-sitemapxml
This commit is contained in:
parent
24aa65fcad
commit
9ef5613eab
1 changed files with 32 additions and 0 deletions
32
alchemy/templates/sitemap.html
Normal file
32
alchemy/templates/sitemap.html
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
||||
|
||||
{% for article in articles %}
|
||||
<url>
|
||||
<loc>{{ SITEURL }}/{{ article.url }}</loc>
|
||||
<priority>0.8</priority>
|
||||
</url>
|
||||
|
||||
{% for translation in article.translations %}
|
||||
<url>
|
||||
<loc>{{ SITEURL }}/{{ translation.url }}</loc>
|
||||
<priority>0.8</priority>
|
||||
</url>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
|
||||
{% for page in pages %}
|
||||
<url>
|
||||
<loc>{{ SITEURL }}/{{ page.url }}</loc>
|
||||
<priority>1.0</priority>
|
||||
</url>
|
||||
|
||||
{% for translation in page.translations %}
|
||||
<url>
|
||||
<loc>{{ SITEURL }}/{{ translation.url }}</loc>
|
||||
<priority>1.0</priority>
|
||||
</url>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
|
||||
</urlset>
|
||||
Loading…
Add table
Add a link
Reference in a new issue