Add deprecation warning to google_news template
authorJoe Mooring <joe.mooring@veriphor.com>
Sun, 21 Nov 2021 01:49:47 +0000 (17:49 -0800)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Sun, 21 Nov 2021 10:25:17 +0000 (11:25 +0100)
Closes #9172

tpl/tplimpl/embedded/templates.autogen.go
tpl/tplimpl/embedded/templates/google_news.html

index 5394cbc7aa2e52d0742899f8ec70c9746ca5ef40..33062ba06b0dfbea8a36716cddc32b223f4da87e 100644 (file)
@@ -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 }}" />
index 9361de16afa5312cb18b41b1e67393c5462e1e8b..d1a995c832e7eb22d222fe5fad1d59b4b22aa6f2 100644 (file)
@@ -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 -}}