diff options
author | XhmikosR <xhmikosr@gmail.com> | 2021-07-17 18:25:13 +0300 |
---|---|---|
committer | XhmikosR <xhmikosr@gmail.com> | 2021-10-13 20:54:39 +0300 |
commit | ecf206aa8cfdaa701e549e6b291a0ecdb7c583ac (patch) | |
tree | 913cabf1fd420be84f72c92551fd82d8e0612905 | |
parent | dabadaf5861e2a617d7dc1178fe21ed527ede0c3 (diff) |
robots.txt: adapt to Cloudflare Pagescf-pages
-rw-r--r-- | docs/layouts/robots.txt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/layouts/robots.txt b/docs/layouts/robots.txt index 271b4f1b7..b35d6583b 100644 --- a/docs/layouts/robots.txt +++ b/docs/layouts/robots.txt @@ -1,8 +1,8 @@ # www.robotstxt.org {{- $isProduction := eq hugo.Environment "production" -}} -{{- $isNetlify := eq (getenv "NETLIFY") "true" -}} -{{- $allowCrawling := and (not $isNetlify) $isProduction -}} +{{- $isCloudflarePages := eq (getenv "CF_PAGES") "1" -}} +{{- $allowCrawling := and (not $isCloudflarePages) $isProduction -}} {{ if $allowCrawling }} # Allow crawling of all content |