I’m using the schema partial below, and using a Schema markup checker, I get errors on a missing logo and image. These two sections in the overall code appear to be for loading the image and the logo:
{{ with $.Param "image" -}}
"image" : {{ . | absURL }},
and
{{ with $.Param "icon" -}}
"logo" : {
"@type": "ImageObject",
"url": {{ . | absURL }}
},
My questions is: where do I put the image and logo that are being called? I’ve tried putting the mages in both /static/
and /static/img/
and the partial doesn’t find them.
Full code in partial:
<script type="application/ld+json">
{
"@context": "https://schema.org",
{{ if .IsPage -}}
"@type": {{ if or (eq .Section "blog") (eq .Section "post") }}"BlogPosting"{{ else }}"WebPage"{{ end }},
"headline": {{ .Title }},
"datePublished": {{ .Date.Format "2006-01-02T15:04:05Z07:00" }},
"dateModified": {{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" }},
"url" : {{ .Permalink }},
"description": {{ with (.Description | default (replaceRE "\n" " " (.Summary | truncate 170))) }}{{ . }}{{ end }},
{{ with .Params.tags -}}
"keywords": {{ . }},
{{ end -}}
{{ else -}}
"@type": "WebPage",
"url" : {{ .Permalink }},
"name": {{ .Title }},
{{ with $.Param "description" -}}
"description": {{ . }},
{{ end -}}
{{ end -}}
{{ with $.Param "image" -}}
"image" : {{ . | absURL }},
{{ end -}}
{{ with $.Param "authors" -}}
"author": {
"@type": "Person",
"name": {{ . }}
},
{{ end -}}
"mainEntityOfPage": {
"@type": "WebPage",
"@id": {{ .Site.BaseURL }}
},
"publisher": {
"@type": "Organization",
"name": {{ .Site.Title }},
{{ with $.Param "icon" -}}
"logo" : {
"@type": "ImageObject",
"url": {{ . | absURL }}
},
{{ end -}}
"url": {{ .Site.BaseURL }}
}
}
</script>