Update siteSchema.html

thumbnailUrl调用DefaultImage
This commit is contained in:
Lvmoo 2021-10-12 17:25:52 +08:00 committed by GitHub
parent 57253d8561
commit a2dacd919d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -16,7 +16,7 @@
{{ with .Site.Params.Sidebar.Avatar -}} {{ with .Site.Params.Sidebar.Avatar -}}
"image": "{{ .src | absURL }}", "image": "{{ .src | absURL }}",
{{- end }} {{- end }}
{{ with .Site.Params.Sidebar.Avatar -}} {{ with .Site.Params.DefaultImage.Opengraph -}}
"thumbnailUrl": "{{ .src | absURL }}", "thumbnailUrl": "{{ .src | absURL }}",
{{- end }} {{- end }}
{{ with .Site.Params.Article.License.Default -}} {{ with .Site.Params.Article.License.Default -}}
@ -41,12 +41,12 @@
"@type": "WebPage", "@type": "WebPage",
"@id": "{{ .Permalink }}" "@id": "{{ .Permalink }}"
}, },
{{ if ge (.Param "width") 696 -}} {{ if ge (.Param "img.width") 696 -}}
"image": { "image": {
"@type": "ImageObject", "@type": "ImageObject",
"url": "{{ .Permalink }}{{ .Param "image" }}", "url": "{{ .Permalink }}{{ .Param "image" }}",
"width": {{ .Param "width" }}, "width": {{ .Param "img.width" }},
"height": {{ .Param "height" }} "height": {{ .Param "img.height" }}
}, },
{{- else if ge .Site.Params.DefaultImage.Opengraph.width 696 -}} {{- else if ge .Site.Params.DefaultImage.Opengraph.width 696 -}}
"image": { "image": {