diff --git a/layouts/robots.txt b/layouts/robots.txt index 020760bad..3965018d4 100644 --- a/layouts/robots.txt +++ b/layouts/robots.txt @@ -1,2 +1,6 @@ User-agent: * -{{ if eq .Site.Params.environment "staging" }}Disallow: /{{ end }} \ No newline at end of file +{{- if eq .Site.Params.environment "staging" }}Disallow: / +{{- else }}{{ range where .Site.Pages ".Params.noindex" true }} +Disallow: {{ .RelPermalink }} +{{ end -}} +{{ end -}} \ No newline at end of file