From a600b0c4d435cb338dc0433a743edaee1112222c Mon Sep 17 00:00:00 2001 From: Denys Konovalov Date: Thu, 16 Feb 2023 14:35:27 +0100 Subject: [PATCH] add dynamic robots.txt --- layouts/robots.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/layouts/robots.txt b/layouts/robots.txt index c62953c..5a6da97 100644 --- a/layouts/robots.txt +++ b/layouts/robots.txt @@ -1,4 +1,13 @@ +{{ if or (eq .Site.BaseURL "https://dev.cantorgymnasium.de/") (eq .Site.BaseURL "https://test.cantorgymnasium.de/") }} + +User-agent: * +Disallow: / + +{{ else }} + User-agent: * Disallow: /admin/ Sitemap: https://cantorgymnasium.de/sitemap.xml + +{{ end }} \ No newline at end of file