feat: add referrer and generator meta tag and canonical link (#192)

This commit is contained in:
Robert Kaussow 2022-02-06 13:13:05 +01:00 committed by GitHub
parent 0e6e2cce60
commit df31c57278
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View File

@ -1,5 +1,7 @@
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<meta name="referrer" content="no-referrer" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
{{ .Hugo.Generator }}
{{ $keywords := default .Site.Params.Keywords .Keywords }} {{ $keywords := default .Site.Params.Keywords .Keywords }}
{{ $authors := default (slice .Site.Params.GeekblogAuthor) .Params.authors }} {{ $authors := default (slice .Site.Params.GeekblogAuthor) .Params.authors }}

View File

@ -66,6 +66,8 @@
media="all" media="all"
/> />
<link rel="canonical" href="{{ .Permalink }}" />
{{- with (.Site.GetPage "home").OutputFormats.Get "atom" }} {{- with (.Site.GetPage "home").OutputFormats.Get "atom" }}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s Atom Feed">` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} {{ printf `<link rel="%s" type="%s" href="%s" title="%s Atom Feed">` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
{{- end }} {{- end }}