From 3ea39841c8049525e31e9f4d6300f0c60cdb42de Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Tue, 24 Jan 2023 13:33:51 +0100 Subject: Adding upstream version 5.2.3+dfsg. Signed-off-by: Daniel Baumann --- site/layouts/robots.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 site/layouts/robots.txt (limited to 'site/layouts/robots.txt') diff --git a/site/layouts/robots.txt b/site/layouts/robots.txt new file mode 100644 index 0000000..271b4f1 --- /dev/null +++ b/site/layouts/robots.txt @@ -0,0 +1,12 @@ +# www.robotstxt.org + +{{- $isProduction := eq hugo.Environment "production" -}} +{{- $isNetlify := eq (getenv "NETLIFY") "true" -}} +{{- $allowCrawling := and (not $isNetlify) $isProduction -}} + +{{ if $allowCrawling }} +# Allow crawling of all content +{{- end }} +User-agent: * +Disallow:{{ if not $allowCrawling }} /{{ end }} +Sitemap: {{ "/sitemap.xml" | absURL }} -- cgit v1.2.3