Browse Source

refactor(layouts/_default): replace deprecated site variable

variable used to output rss deprecated in hugo 0.55.0
Josh Habdas 7 months ago
parent
commit
f72d07befc
Signed by: Josh Habdas <jhabdas@protonmail.com> GPG Key ID: B148B31154C75A74
1 changed files with 3 additions and 3 deletions
  1. 3
    3
      layouts/_default/baseof.html

+ 3
- 3
layouts/_default/baseof.html View File

@@ -2,7 +2,7 @@
2 2
 <html lang="{{ .Site.LanguageCode }}">
3 3
   <head>
4 4
     {{ partial "meta/content-security-policy.html" . }}
5
-    {{ .Hugo.Generator }}
5
+    <meta name="generator" content="{{ with .Site.Data.npm.latest }}{{ .name | humanize | title }} {{ .version }} (Hugo {{ $.Hugo.Version }}){{ else }}Hugo {{ .Hugo.Version }}{{ end }}">
6 6
     <meta charset="utf-8">
7 7
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
8 8
     <title>{{ block "title" . }}{{ .Title }} | {{ .Site.Title }}{{ end }}</title>
@@ -31,8 +31,8 @@
31 31
       {{- $baseof.Content | safeJS -}}
32 32
     </script>
33 33
     {{ partial "head/modules.html" . }}
34
-    {{ if .RSSLink }}
35
-      <link href="{{ .RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}">
34
+    {{ with .OutputFormats.Get "rss" }}
35
+      {{ printf "<link rel=\"%s\" type=\"%s\" href=\"%s\" title=\"%s\">" .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
36 36
     {{ end }}
37 37
     <link rel="canonical" href="{{ .Permalink }}">
38 38
     {{ if (isset .Params "prev") }}

Loading…
Cancel
Save