diff options
author | Alexandros <onedrawingperday@users.noreply.github.com> | 2017-06-09 00:12:39 +0300 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2017-06-08 23:12:39 +0200 |
commit | d5ab7f087d967b30e7de7d789e6ad3091b42f1f7 (patch) | |
tree | 053d42d558724e9eaf53841e7f73ead058422026 /hugolib/alias.go | |
parent | 55dd533bf759ab1e19fd5ff3d38f7fa5f3fd589a (diff) |
Add noindex tag to HTML generated by Hugo Aliases
So that Googlebot can stop keeping the old URLs in the SERPs.
Diffstat (limited to 'hugolib/alias.go')
-rw-r--r-- | hugolib/alias.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hugolib/alias.go b/hugolib/alias.go index 20be7c732..816ba962b 100644 --- a/hugolib/alias.go +++ b/hugolib/alias.go @@ -30,8 +30,8 @@ import ( ) const ( - alias = "<!DOCTYPE html><html><head><title>{{ .Permalink }}</title><link rel=\"canonical\" href=\"{{ .Permalink }}\"/><meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\" /><meta http-equiv=\"refresh\" content=\"0; url={{ .Permalink }}\" /></head></html>" - aliasXHtml = "<!DOCTYPE html><html xmlns=\"http://www.w3.org/1999/xhtml\"><head><title>{{ .Permalink }}</title><link rel=\"canonical\" href=\"{{ .Permalink }}\"/><meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\" /><meta http-equiv=\"refresh\" content=\"0; url={{ .Permalink }}\" /></head></html>" + alias = "<!DOCTYPE html><html><head><title>{{ .Permalink }}</title><link rel=\"canonical\" href=\"{{ .Permalink }}\"/><meta name=\"robots\" content=\"noindex\"><meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\" /><meta http-equiv=\"refresh\" content=\"0; url={{ .Permalink }}\" /></head></html>" + aliasXHtml = "<!DOCTYPE html><html xmlns=\"http://www.w3.org/1999/xhtml\"><head><title>{{ .Permalink }}</title><link rel=\"canonical\" href=\"{{ .Permalink }}\"/><meta name=\"robots\" content=\"noindex\"><meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\" /><meta http-equiv=\"refresh\" content=\"0; url={{ .Permalink }}\" /></head></html>" ) var defaultAliasTemplates *template.Template |