From b4ac73b62a4f45680fbe89658f9b574c91a29919 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 c62953c4..5a6da974 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