diff options
| author | Serghei Iakovlev <egrep@protonmail.ch> | 2022-03-26 16:57:45 +0100 |
|---|---|---|
| committer | Serghei Iakovlev <egrep@protonmail.ch> | 2022-03-26 16:57:45 +0100 |
| commit | 41549ec311cdd823987ff61082e8718451da89b9 (patch) | |
| tree | 787e66311cfde6961d3f8f672af87526fe17311f /layouts/robots.txt | |
| parent | 131f980eb3060887e76745411e1eca82defb5d73 (diff) | |
| download | gohugo-theme-ed-41549ec311cdd823987ff61082e8718451da89b9.tar.gz | |
Add robots.txt
Diffstat (limited to 'layouts/robots.txt')
| -rw-r--r-- | layouts/robots.txt | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/layouts/robots.txt b/layouts/robots.txt new file mode 100644 index 0000000..7a24e82 --- /dev/null +++ b/layouts/robots.txt @@ -0,0 +1,8 @@ +User-agent: * +# robotstxt.org - if ENV production variable is false robots will be disallowed. +{{ if eq (getenv "HUGO_ENV") "production" | or (eq .Site.Params.env "production") }} +Allow: / +Sitemap: {{.Site.BaseURL}}/sitemap.xml +{{ else }} +Disallow: / +{{ end }} |
