Browse Source

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

refactoring
Nico Schottelius 3 years ago
parent
commit
193896efa7
  1. 2
      Makefile
  2. 3
      content/sitemap.xml/contents.lr
  3. 7
      templates/sitemap.xml

2
Makefile

@ -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 {} \;

3
content/sitemap.xml/contents.lr

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

7
templates/sitemap.xml

@ -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>
Loading…
Cancel
Save