diff --git a/layouts/robots.txt b/layouts/robots.txt index 3965018d4..1c6ecf933 100644 --- a/layouts/robots.txt +++ b/layouts/robots.txt @@ -1,5 +1,5 @@ User-agent: * -{{- if eq .Site.Params.environment "staging" }}Disallow: / +{{ if eq .Site.Params.environment "staging" }}Disallow: / {{- else }}{{ range where .Site.Pages ".Params.noindex" true }} Disallow: {{ .RelPermalink }} {{ end -}}