Merge branch 'master' of code.ungleich.ch:ungleich-public/ungleich-staticcms

This commit is contained in:
Nico Schottelius 2020-01-13 11:34:36 +01:00
commit 193896efa7
3 changed files with 11 additions and 1 deletions

View file

@ -8,7 +8,7 @@ pull:
publish: pull build permissions
rsync -av --delete --exclude .lektor/ $(BUILDDIR)/u/ $(DESTINATION)
rsync -av --delete $(BUILDDIR)/sitemap.xml $(DESTINATION)
permissions: build
find $(BUILDDIR) -type f -exec chmod 0644 {} \;
find $(BUILDDIR) -type d -exec chmod 0755 {} \;

View file

@ -0,0 +1,3 @@
_template: sitemap.xml
---
_model: none

7
templates/sitemap.xml Normal file
View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
{%- for page in [site.root] if page != this recursive %}
<url><loc>{{ page|url(external=true) }}</loc></url>
{{- loop(page.children) }}
{%- endfor %}
</urlset>