From 6617a034fea58da67d432ccfe99cc9025cc4b502 Mon Sep 17 00:00:00 2001 From: Mitja Felicijan Date: Mon, 17 Jul 2023 02:17:52 +0200 Subject: Added robots.txt and sitemap.xml --- config.yaml | 4 ++++ templates/robots.txt | 2 ++ templates/sitemap.xml | 8 ++++++++ 3 files changed, 14 insertions(+) create mode 100644 templates/robots.txt create mode 100644 templates/sitemap.xml diff --git a/config.yaml b/config.yaml index 324d762..1579fa1 100644 --- a/config.yaml +++ b/config.yaml @@ -15,3 +15,7 @@ extras: url: index.xml - template: notes.xml url: notes.xml + - template: robots.txt + url: robots.txt + - template: sitemap.xml + url: sitemap.xml diff --git a/templates/robots.txt b/templates/robots.txt new file mode 100644 index 0000000..c2a49f4 --- /dev/null +++ b/templates/robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Allow: / diff --git a/templates/sitemap.xml b/templates/sitemap.xml new file mode 100644 index 0000000..3a9cb09 --- /dev/null +++ b/templates/sitemap.xml @@ -0,0 +1,8 @@ + + {{ range $idx, $page := .Pages }} + + {{ $.Config.BaseURL }}/{{ $page.RelPermalink }} + {{ $page.Created.Format "2006-01-02T15:04:05" }}+00:00 + + {{ end }} + -- cgit v1.2.3