From cfdf9e68bb70653a3e7687c01988695b3927bd4c Mon Sep 17 00:00:00 2001 From: meow Date: Mon, 13 Jan 2020 06:51:47 +0500 Subject: [PATCH 1/2] sitemap added --- content/sitemap.xml/contents.lr | 3 +++ templates/sitemap.xml | 7 +++++++ 2 files changed, 10 insertions(+) create mode 100644 content/sitemap.xml/contents.lr create mode 100644 templates/sitemap.xml diff --git a/content/sitemap.xml/contents.lr b/content/sitemap.xml/contents.lr new file mode 100644 index 0000000..a4633de --- /dev/null +++ b/content/sitemap.xml/contents.lr @@ -0,0 +1,3 @@ +_template: sitemap.xml +--- +_model: none \ No newline at end of file diff --git a/templates/sitemap.xml b/templates/sitemap.xml new file mode 100644 index 0000000..ebb924c --- /dev/null +++ b/templates/sitemap.xml @@ -0,0 +1,7 @@ + + + {%- for page in [site.root] if page != this recursive %} + {{ page|url(external=true) }} + {{- loop(page.children) }} + {%- endfor %} + \ No newline at end of file From 80413e598a35bdc3c9b96a907352c26c6abee79e Mon Sep 17 00:00:00 2001 From: meow Date: Mon, 13 Jan 2020 07:07:57 +0500 Subject: [PATCH 2/2] added sitemap.xml rsync recipe in Makefile --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 8d6a3f4..b9fd51b 100644 --- a/Makefile +++ b/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 {} \;