Skip to content

Commit a569500

Browse files
authored
Add robotsNoIndex parameter (adityatelange#900)
- adds the ability to use the noindex and nofollow parameters for specific pages in production mode, preventing e.g. the imprint from showing up in search engines. - Usage: In post front-matter add, --- robotsNoIndex: true ---
1 parent 74987bc commit a569500

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

layouts/partials/head.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<meta charset="utf-8">
22
<meta http-equiv="X-UA-Compatible" content="IE=edge">
33
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
4-
{{- if hugo.IsProduction | or (eq site.Params.env "production") }}
4+
{{- if hugo.IsProduction | or (eq site.Params.env "production") | and (ne .Params.robotsNoIndex true) }}
55
<meta name="robots" content="index, follow">
66
{{- else }}
77
<meta name="robots" content="noindex, nofollow">

0 commit comments

Comments
 (0)