diff options
| author | Aditya Telange <21258296+adityatelange@users.noreply.github.com> | 2020-11-14 12:54:22 +0530 |
|---|---|---|
| committer | Aditya Telange <21258296+adityatelange@users.noreply.github.com> | 2020-11-14 12:55:19 +0530 |
| commit | 62477e7d1b3a69bf76d413e6a4281f93b582b03d (patch) | |
| tree | 0efbee8e548768c3854a8cb6d9e69ac8ae83e525 | |
| parent | f4998a1ab8336e1057eecbd023493aea8f65eb0b (diff) | |
head: add meta robots
- disable indexing for non-prod sites
| -rw-r--r-- | layouts/partials/head.html | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/layouts/partials/head.html b/layouts/partials/head.html index e9d0bfd..1a56247 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -1,6 +1,11 @@ <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> +{{- if eq (getenv "HUGO_ENV") "production" | or (eq .Site.Params.env "production") }} +<meta name="robots" content="index, follow"> +{{- else }} +<meta name=" robots" content="noindex, nofollow"> +{{- end -}} <!-- Title --> <title>{{ if .IsHome }}{{else}}{{ if .Title }}{{ .Title }} - {{ end }}{{end}}{{ .Site.Title }}</title> <!-- Meta --> |
