json-schema: add more params

This commit is contained in:
Aditya Telange
2020-10-14 22:57:31 +05:30
parent 18420036a3
commit 64149de7b6

View File

@@ -3,8 +3,10 @@
{ {
"@context": "https://schema.org", "@context": "https://schema.org",
"@type": "{{- ( .Site.Params.schema.publisherType | default "Organization") | humanize -}}", "@type": "{{- ( .Site.Params.schema.publisherType | default "Organization") | humanize -}}",
"name": {{ .Site.Params.title }}, "name": {{ .Site.Title }},
"url": {{ .Site.BaseURL }}, "url": {{ .Site.BaseURL }},
"description": {{ .Site.Params.description | plainify | safeHTML }},
"thumbnailUrl": {{ .Site.Params.assets.favicon | default "favicon.ico" | absURL }},
"sameAs": [ "sameAs": [
{{- if .Site.Params.schema.sameAs }} {{- if .Site.Params.schema.sameAs }}
{{ range $i, $e := .Site.Params.schema.sameAs }}{{ if $i }}, {{ end }}{{ $e }}{{ end }} {{ range $i, $e := .Site.Params.schema.sameAs }}{{ if $i }}, {{ end }}{{ $e }}{{ end }}
@@ -29,6 +31,8 @@
{{ range $i, $e := .Params.tags }}{{ if $i }}, {{ end }}{{ $e }}{{ end }} {{ range $i, $e := .Params.tags }}{{ if $i }}, {{ end }}{{ $e }}{{ end }}
{{- end }} {{- end }}
], ],
"wordCount" : "{{ .WordCount }}",
"inLanguage": {{ .Language.Lang | default "en-us" }},
{{ if .Params.cover.image -}} {{ if .Params.cover.image -}}
"image": "image":
{{- if (ne .Params.cover.relative true) -}} {{- if (ne .Params.cover.relative true) -}}
@@ -48,7 +52,7 @@
}, },
"publisher": { "publisher": {
"@type": "{{- ( .Site.Params.schema.publisherType | default "Organization") | humanize -}}", "@type": "{{- ( .Site.Params.schema.publisherType | default "Organization") | humanize -}}",
"name": {{ .Site.Params.title }}, "name": {{ .Site.Title }},
"logo": { "logo": {
"@type": "ImageObject", "@type": "ImageObject",
"url": {{ .Site.Params.assets.favicon | default "favicon.ico" | absURL }} "url": {{ .Site.Params.assets.favicon | default "favicon.ico" | absURL }}