0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-12-14 02:24:00 +01:00
Bootstrap/site/layouts/robots.txt
XhmikosR 930740afbc
Some checks failed
BrowserStack / browserstack (push) Has been cancelled
Bundlewatch / bundlewatch (push) Has been cancelled
CodeQL / Analyze (push) Has been cancelled
cspell / cspell (push) Has been cancelled
CSS / css (push) Has been cancelled
Docs / docs (push) Has been cancelled
JS Tests / JS Tests (push) Has been cancelled
Lint / lint (push) Has been cancelled
CSS (node-sass) / css (push) Has been cancelled
Release notes / update_release_draft (push) Has been cancelled
Switch to using hugo.IsProduction (#39763)
2024-03-08 12:41:17 +02:00

12 lines
306 B
Plaintext

# www.robotstxt.org
{{- $isNetlify := eq (getenv "NETLIFY") "true" -}}
{{- $allowCrawling := and (not $isNetlify) hugo.IsProduction -}}
{{ if $allowCrawling }}
# Allow crawling of all content
{{- end }}
User-agent: *
Disallow:{{ if not $allowCrawling }} /{{ end }}
Sitemap: {{ "/sitemap.xml" | absURL }}