add site title after title
This commit is contained in:
parent
e1216a8d00
commit
4f722e0c6d
|
@ -8,7 +8,11 @@
|
|||
{{- end }}
|
||||
|
||||
{{- /* Title */}}
|
||||
<title>{{ if .IsHome }}{{ else }}{{ if .Title }}{{ .Title }} | {{ end }}{{ end }}{{ site.Title }}</title>
|
||||
{{- $pageTitle := site.Title }}
|
||||
{{- if (and .Title (not .IsHome)) }}
|
||||
{{- $pageTitle = printf "%s | %s" .Title $pageTitle }}
|
||||
{{- end }}
|
||||
<title>{{ $pageTitle }}</title>
|
||||
|
||||
{{- /* Meta */}}
|
||||
{{- if .IsHome }}
|
||||
|
@ -73,19 +77,17 @@
|
|||
|
||||
{{- /* https://developer.twitter.com/en/docs/twitter-for-websites/cards/guides/getting-started */}}
|
||||
{{- if .Params.cover.image }}
|
||||
<meta name="twitter:card" property="twitter:card" content="summary_large_image" />
|
||||
<meta name="twitter:image" content="{{ (path.Join .RelPermalink .Params.cover.image ) | absURL }}" />
|
||||
<meta name="twitter:title" content="{{ .Title }}" />
|
||||
<meta name="twitter:description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end -}}" />
|
||||
<meta name="twitter:site" content="@novoreorx" />
|
||||
<meta name="twitter:creator" content="@novoreorx" />
|
||||
{{- else -}}
|
||||
{{- template "_internal/twitter_cards.html" . -}}
|
||||
{{- end -}}
|
||||
<meta name="twitter:card" property="twitter:card" content="summary_large_image" />
|
||||
<meta name="twitter:title" content="{{ $pageTitle }}" />
|
||||
<meta name="twitter:description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end -}}" />
|
||||
<meta name="twitter:site" content="@novoreorx" />
|
||||
<meta name="twitter:creator" content="@novoreorx" />
|
||||
|
||||
{{- template "partials/templates/opengraph.html" . }}
|
||||
{{- template "partials/templates/opengraph.html" (dict "page" . "pageTitle" $pageTitle) }}
|
||||
|
||||
{{- template "partials/templates/schema_json.html" . }}
|
||||
{{- template "partials/templates/schema_json.html" (dict "page" . "pageTitle" $pageTitle) }}
|
||||
|
||||
{{- partial "extend_head.html" . }}
|
||||
<noscript>
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<meta property="og:title" content="{{ .Title }}" />
|
||||
{{ with .page }}
|
||||
<meta property="og:title" content="{{ $.pageTitle }}" />
|
||||
<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 }}" />
|
||||
<meta property="og:url" content="{{ .Permalink }}" />
|
||||
|
@ -50,3 +51,5 @@
|
|||
|
||||
{{- /* Facebook Page Admin ID for Domain Insights */}}
|
||||
{{- with site.Social.facebook_admin }}<meta property="fb:admins" content="{{ . }}" />{{ end }}
|
||||
|
||||
{{- end }}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{{ with .page }}
|
||||
{{ if .IsHome }}
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
|
@ -60,7 +61,7 @@
|
|||
{
|
||||
"@context": "https://schema.org",
|
||||
"@type": "BlogPosting",
|
||||
"headline": {{ .Title | plainify}},
|
||||
"headline": {{ $.pageTitle | plainify}},
|
||||
"name": "{{ .Title | plainify }}",
|
||||
"description": {{ with .Description | plainify }}{{ . }}{{ else }}{{ .Summary | plainify }}{{ end -}},
|
||||
"keywords": [
|
||||
|
@ -70,7 +71,6 @@
|
|||
{{ range $i, $e := .Params.tags }}{{ if $i }}, {{ end }}{{ $e }}{{ end }}
|
||||
{{- end }}
|
||||
],
|
||||
"articleBody": {{ .Content | safeJS | htmlUnescape | plainify }},
|
||||
"wordCount" : "{{ .WordCount }}",
|
||||
"inLanguage": {{ .Language.Lang | default "en-us" }},
|
||||
{{ if .Params.cover.image -}}
|
||||
|
@ -117,3 +117,4 @@
|
|||
{{- end }}{{/* .IsPage end */}}
|
||||
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
|
Loading…
Reference in New Issue