mirror of
https://github.com/Wonderfall/hugo-WonderMod.git
synced 2024-11-23 02:51:39 +01:00
head : improve meta
This commit is contained in:
parent
c7885d62a2
commit
d3517dadbf
@ -4,13 +4,14 @@
|
|||||||
<!-- Title -->
|
<!-- Title -->
|
||||||
<title>{{ if .IsHome }}{{else}}{{ if .Title }}{{ .Title }} - {{ end }}{{end}}{{ .Site.Title }}</title>
|
<title>{{ if .IsHome }}{{else}}{{ if .Title }}{{ .Title }} - {{ end }}{{end}}{{ .Site.Title }}</title>
|
||||||
<!-- Meta -->
|
<!-- Meta -->
|
||||||
{{- if eq .Kind "page" }}
|
{{- if in site.Params.mainSections .Type }}
|
||||||
<meta name="description" content="{{ .Summary }}">
|
<meta name="description" content="{{ .Summary }}">
|
||||||
<meta name="author" content="{{ .Params.author | default .Site.Params.author }}">
|
|
||||||
{{- else }}
|
{{- else }}
|
||||||
<meta name="description" content="{{if .IsHome}}{{ .Site.Params.description }}{{else}}{{ .Title }}{{end}}">
|
<meta name="description"
|
||||||
<meta name="author" content="{{ .Site.Params.author }}">
|
content="{{if .IsHome}}{{ .Site.Params.description }}{{else}}{{ .Title }} - {{ .Site.Title }}{{end}}">
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
<meta name="author" content="{{ .Params.author | default .Site.Params.author }}">
|
||||||
|
<link rel="canonical" href="{{ .Permalink }}" />
|
||||||
{{ if .Site.Params.analytics.google.SiteVerificationTag }}
|
{{ if .Site.Params.analytics.google.SiteVerificationTag }}
|
||||||
<meta name="google-site-verification" content="{{ .Site.Params.analytics.google.SiteVerificationTag }}" />
|
<meta name="google-site-verification" content="{{ .Site.Params.analytics.google.SiteVerificationTag }}" />
|
||||||
{{end}}
|
{{end}}
|
||||||
@ -48,4 +49,6 @@
|
|||||||
{{- if eq (getenv "HUGO_ENV") "production" | or (eq .Site.Params.env "production") }}
|
{{- if eq (getenv "HUGO_ENV") "production" | or (eq .Site.Params.env "production") }}
|
||||||
{{- template "_internal/google_analytics_async.html" . }}
|
{{- template "_internal/google_analytics_async.html" . }}
|
||||||
{{- template "_internal/opengraph.html" . }}
|
{{- template "_internal/opengraph.html" . }}
|
||||||
|
{{- template "_internal/twitter_cards.html" . }}
|
||||||
|
{{- template "_internal/schema.html" . }}
|
||||||
{{- end }}
|
{{- end }}
|
Loading…
Reference in New Issue
Block a user