2
0
mirror of https://github.com/offen/website.git synced 2024-11-22 09:00:28 +01:00

render sitemap via pelican template

This commit is contained in:
Frederik Ring 2019-10-21 22:23:34 +02:00
parent 171c770988
commit 5134be4fe0
4 changed files with 17 additions and 1 deletions

View File

@ -3,6 +3,7 @@ description: offen is a free and open source analytics software for websites and
save_as: 404.html
href: /404.html
no_stats: true
exclude_from_sitemap: true
![Page not Found](/theme/images/content-404.webp){:class="image-text-560-315"}

View File

@ -1,6 +1,7 @@
Title: Opt-out | offen
description: offen is a free and open source analytics software for websites and web applications that allows respectful handling of data.
save_as: opt-out/index.html
exclude_from_sitemap: true
## You are opted out

View File

@ -18,6 +18,8 @@ TRANSLATION_FEED_ATOM = None
AUTHOR_FEED_ATOM = None
AUTHOR_FEED_RSS = None
SITEURL = 'http://localhost:8000'
# pagination
DEFAULT_PAGINATION = False
@ -33,7 +35,8 @@ CATEGORIES_SAVE_AS = None
TAGS_SAVE_AS = None
# keep this for access to page variable
DIRECT_TEMPLATES = []
DIRECT_TEMPLATES = ['sitemap']
SITEMAP_SAVE_AS = 'sitemap.xml'
PLUGIN_PATHS = ['./plugins']
PLUGINS = ['assets']

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
{% for page in pages %}
{% if not page.exclude_from_sitemap %}
<url>
<loc>{{ SITEURL }}{{ page.href }}</loc>
<priority>{{ page.sitemap_priority or 1.0 }}</priority>
</url>
{% endif %}
{% endfor %}
</urlset>