list pages with robotsNoIndex in robots.txt
This commit is contained in:
parent
7e03764251
commit
724b999be4
@ -1,6 +1,12 @@
|
||||
User-agent: *
|
||||
{{- if hugo.IsProduction | or (eq site.Params.env "production") }}
|
||||
{{- $noIndexPages := where .Site.Pages "Params.robotsNoIndex" true }}
|
||||
{{- range $noIndexPages }}
|
||||
Disallow: {{ .RelPermalink }}
|
||||
{{- end }}
|
||||
{{- if not $noIndexPages }}
|
||||
Disallow:
|
||||
{{- end }}
|
||||
{{- else }}
|
||||
Disallow: /
|
||||
{{- end }}
|
||||
|
Loading…
x
Reference in New Issue
Block a user