diff options
| author | Reorx <novoreorx@gmail.com> | 2022-05-05 18:47:00 +0800 |
|---|---|---|
| committer | Reorx <novoreorx@gmail.com> | 2022-05-05 18:47:00 +0800 |
| commit | 4f722e0c6d05755ee47ca748b03ae6bbd2f7ccf6 (patch) | |
| tree | dd95605dad5e173daaea543ff55ac31a2f4345d8 /layouts/partials/templates | |
| parent | e1216a8d0052f8c135beb3493dea2c91903bbc17 (diff) | |
add site title after title
Diffstat (limited to 'layouts/partials/templates')
| -rw-r--r-- | layouts/partials/templates/opengraph.html | 5 | ||||
| -rw-r--r-- | layouts/partials/templates/schema_json.html | 5 |
2 files changed, 7 insertions, 3 deletions
diff --git a/layouts/partials/templates/opengraph.html b/layouts/partials/templates/opengraph.html index 6b187f2..4a1de00 100644 --- a/layouts/partials/templates/opengraph.html +++ b/layouts/partials/templates/opengraph.html @@ -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 }} diff --git a/layouts/partials/templates/schema_json.html b/layouts/partials/templates/schema_json.html index 6ce1c2e..8831609 100644 --- a/layouts/partials/templates/schema_json.html +++ b/layouts/partials/templates/schema_json.html @@ -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 -}} |
