From f66fcd2c2a75ec081afb2455f0e53bf5be0aa073 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Niemier?= Date: Wed, 1 Mar 2023 21:33:35 +0100 Subject: [PATCH] fix: do not index CV page --- content/cv/index.md | 1 + templates/robots.txt | 4 ++++ templates/sitemap.xml | 13 +++++++++++++ 3 files changed, 18 insertions(+) create mode 100644 templates/sitemap.xml diff --git a/content/cv/index.md b/content/cv/index.md index 8f995a0..e0a0467 100644 --- a/content/cv/index.md +++ b/content/cv/index.md @@ -3,6 +3,7 @@ title = "CV" [extra] no_comments = true +sitemap = false +++ {{ cv() }} diff --git a/templates/robots.txt b/templates/robots.txt index e69de29..e9f11a0 100644 --- a/templates/robots.txt +++ b/templates/robots.txt @@ -0,0 +1,4 @@ +User-agent: * +Disallow: /cv/ +Allow: / +Sitemap: {{ get_url(path="sitemap.xml") }} diff --git a/templates/sitemap.xml b/templates/sitemap.xml new file mode 100644 index 0000000..5c5f707 --- /dev/null +++ b/templates/sitemap.xml @@ -0,0 +1,13 @@ + + + {%- for sitemap_entry in entries %} + {%- if sitemap_entry.extra | get(key="sitemap", default=true) %} + + {{ sitemap_entry.permalink | escape_xml | safe }} + {%- if sitemap_entry.updated %} + {{ sitemap_entry.updated }} + {%- endif %} + + {%- endif %} + {%- endfor %} + -- 2.51.2