2
0
mirror of https://github.com/offen/website.git synced 2024-10-18 20:20:24 +02: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 save_as: 404.html
href: /404.html href: /404.html
no_stats: true no_stats: true
exclude_from_sitemap: true
![Page not Found](/theme/images/content-404.webp){:class="image-text-560-315"} ![Page not Found](/theme/images/content-404.webp){:class="image-text-560-315"}

View File

@ -1,6 +1,7 @@
Title: Opt-out | offen 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. 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 save_as: opt-out/index.html
exclude_from_sitemap: true
## You are opted out ## You are opted out

View File

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