We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 27daefa commit 1d0cf7eCopy full SHA for 1d0cf7e
layouts/partials/head.html
@@ -1,11 +1,12 @@
1
{{- $isBlogPost := eq .Section "blog" }}
2
{{- $ogType := cond (.IsHome) "website" "article" }}
3
-<!-- per-page robot indexing controls -->
4
-{{- if hugo.IsProduction -}}
5
-<meta name="ROBOTS" content="INDEX, FOLLOW">
6
-{{- else -}}
7
-<meta name="ROBOTS" content="NOINDEX, NOFOLLOW">
8
-{{- end -}}
+
+{{ $outputFormat := partial "outputformat.html" . -}}
+{{ if and hugo.IsProduction (ne $outputFormat "print") -}}
+<meta name="robots" content="index, follow">
+{{ else -}}
+<meta name="robots" content="noindex, nofollow">
9
+{{ end -}}
10
11
<!-- alternative translations -->
12
{{ range .Translations -}}
0 commit comments