diff --git a/hugo.toml b/hugo.toml index fe57943..f15b958 100755 --- a/hugo.toml +++ b/hugo.toml @@ -1,6 +1,3 @@ -########################### Deployment ############################# -# set to "development" or "production" to deploy the site to the correct environment -environment = "development" ######################## default configuration #################### # The base URL of your site (required). This will be prepended to all relative URLs. @@ -19,6 +16,12 @@ defaultContentLanguage = "de" # disable language disableLanguages = ["en"] hasCJKLanguage = false # If hasCJKLanguage true, auto-detect Chinese/Japanese/Korean Languages in the content. see: https://gohugo.io/getting-started/configuration/#hascjklanguage +enableRobotsTXT = true + +########################### Deployment ############################# +# set to "development" or "production" to deploy the site to the correct environment and set robots.txt to disallow all +[params] +environment = "development" ########################### Services ############################# [services] diff --git a/themes/hugoplate/layouts/robots.txt b/themes/hugoplate/layouts/robots.txt new file mode 100644 index 0000000..737b9c9 --- /dev/null +++ b/themes/hugoplate/layouts/robots.txt @@ -0,0 +1,4 @@ +User-agent: * +{{ if eq .Site.Params.environment "development" }} +Disallow: / +{{ end }} \ No newline at end of file