mirror of
https://github.com/avinal/avinal.github.io.git
synced 2026-07-04 07:40:09 +05:30
sitemap generation added
Signed-off-by: Avinal Kumar <avinal.xlvii@gmail.com>
This commit is contained in:
@@ -52,6 +52,8 @@ ICONS = [
|
|||||||
('linkedin', 'https://www.linkedin.com/in/avinal/')
|
('linkedin', 'https://www.linkedin.com/in/avinal/')
|
||||||
]
|
]
|
||||||
|
|
||||||
|
DIRECT_TEMPLATES = ('index', 'tags', 'categories', 'archives', 'sitemap')
|
||||||
|
SITEMAP_SAVE_AS = 'sitemap.xml'
|
||||||
|
|
||||||
DEFAULT_PAGINATION = 10
|
DEFAULT_PAGINATION = 10
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
||||||
|
|
||||||
{% for article in articles %}
|
{% for article in articles %}
|
||||||
<url>
|
<url>
|
||||||
<loc>{{ SITEURL }}/{{ article.url }}</loc>
|
<loc>{{ SITEURL }}/{{ article.url }}</loc>
|
||||||
<priority>0.8</priority>
|
<priority>0.8</priority>
|
||||||
</url>
|
</url>
|
||||||
|
|
||||||
{% for translation in article.translations %}
|
{% for translation in article.translations %}
|
||||||
<url>
|
<url>
|
||||||
<loc>{{ SITEURL }}/{{ translation.url }}</loc>
|
<loc>{{ SITEURL }}/{{ translation.url }}</loc>
|
||||||
@@ -12,11 +14,13 @@
|
|||||||
</url>
|
</url>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
{% for page in pages %}
|
{% for page in pages %}
|
||||||
<url>
|
<url>
|
||||||
<loc>{{ SITEURL }}/{{ page.url }}</loc>
|
<loc>{{ SITEURL }}/{{ page.url }}</loc>
|
||||||
<priority>1.0</priority>
|
<priority>1.0</priority>
|
||||||
</url>
|
</url>
|
||||||
|
|
||||||
{% for translation in page.translations %}
|
{% for translation in page.translations %}
|
||||||
<url>
|
<url>
|
||||||
<loc>{{ SITEURL }}/{{ translation.url }}</loc>
|
<loc>{{ SITEURL }}/{{ translation.url }}</loc>
|
||||||
@@ -24,4 +28,5 @@
|
|||||||
</url>
|
</url>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
</urlset>
|
</urlset>
|
||||||
Reference in New Issue
Block a user