mirror of
https://github.com/offen/website.git
synced 2024-12-23 13:30:20 +01:00
render sitemap via pelican template
This commit is contained in:
parent
171c770988
commit
5134be4fe0
@ -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"}
|
||||
|
@ -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
|
||||
|
||||
|
@ -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']
|
||||
|
11
homepage/theme/templates/sitemap.html
Normal file
11
homepage/theme/templates/sitemap.html
Normal 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>
|
Loading…
Reference in New Issue
Block a user