Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tpl
diff options
context:
space:
mode:
authorJoe Mooring <joe.mooring@veriphor.com>2021-11-21 04:49:47 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2021-11-21 13:25:17 +0300
commit75a823a36a75781c0c5d89fe9f328e3b9322d95f (patch)
treea2cdf06e448aab46dc52214aa2bd2de049ea5620 /tpl
parent5e0947c5b5a5ef243c7be8e958d357e8c5b320da (diff)
Add deprecation warning to google_news template
Closes #9172
Diffstat (limited to 'tpl')
-rw-r--r--tpl/tplimpl/embedded/templates.autogen.go10
-rw-r--r--tpl/tplimpl/embedded/templates/google_news.html9
2 files changed, 13 insertions, 6 deletions
diff --git a/tpl/tplimpl/embedded/templates.autogen.go b/tpl/tplimpl/embedded/templates.autogen.go
index 5394cbc7a..33062ba06 100644
--- a/tpl/tplimpl/embedded/templates.autogen.go
+++ b/tpl/tplimpl/embedded/templates.autogen.go
@@ -200,9 +200,13 @@ if (!doNotTrack) {
{{ end }}
{{- end -}}
`},
- {`google_news.html`, `{{ if .IsPage }}{{ with .Params.news_keywords }}
- <meta name="news_keywords" content="{{ range $i, $kw := first 10 . }}{{ if $i }},{{ end }}{{ $kw }}{{ end }}" />
-{{ end }}{{ end }}`},
+ {`google_news.html`, `{{- warnf "The google_news internal template will be removed in a future release. Please remove calls to this template. See https://github.com/gohugoio/hugo/issues/9172 for additional information." -}}
+{{- if .IsPage -}}
+ {{- with .Params.news_keywords -}}
+ <meta name="news_keywords" content="{{ range $i, $kw := first 10 . }}{{ if $i }},{{ end }}{{ $kw }}{{ end }}">
+ {{- end -}}
+{{- end -}}
+`},
{`opengraph.html`, `<meta property="og:title" content="{{ .Title }}" />
<meta property="og:description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}" />
<meta property="og:type" content="{{ if .IsPage }}article{{ else }}website{{ end }}" />
diff --git a/tpl/tplimpl/embedded/templates/google_news.html b/tpl/tplimpl/embedded/templates/google_news.html
index 9361de16a..d1a995c83 100644
--- a/tpl/tplimpl/embedded/templates/google_news.html
+++ b/tpl/tplimpl/embedded/templates/google_news.html
@@ -1,3 +1,6 @@
-{{ if .IsPage }}{{ with .Params.news_keywords }}
- <meta name="news_keywords" content="{{ range $i, $kw := first 10 . }}{{ if $i }},{{ end }}{{ $kw }}{{ end }}" />
-{{ end }}{{ end }} \ No newline at end of file
+{{- warnf "The google_news internal template will be removed in a future release. Please remove calls to this template. See https://github.com/gohugoio/hugo/issues/9172 for additional information." -}}
+{{- if .IsPage -}}
+ {{- with .Params.news_keywords -}}
+ <meta name="news_keywords" content="{{ range $i, $kw := first 10 . }}{{ if $i }},{{ end }}{{ $kw }}{{ end }}">
+ {{- end -}}
+{{- end -}}