summaryrefslogtreecommitdiff
path: root/layouts/partials/templates/schema_json.html
diff options
context:
space:
mode:
authorReorx <novoreorx@gmail.com>2022-05-05 18:47:00 +0800
committerReorx <novoreorx@gmail.com>2022-05-05 18:47:00 +0800
commit4f722e0c6d05755ee47ca748b03ae6bbd2f7ccf6 (patch)
treedd95605dad5e173daaea543ff55ac31a2f4345d8 /layouts/partials/templates/schema_json.html
parente1216a8d0052f8c135beb3493dea2c91903bbc17 (diff)
add site title after title
Diffstat (limited to 'layouts/partials/templates/schema_json.html')
-rw-r--r--layouts/partials/templates/schema_json.html5
1 files changed, 3 insertions, 2 deletions
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 -}}