mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-04-27 05:38:26 -04:00
42 lines
1.3 KiB
HTML
42 lines
1.3 KiB
HTML
{{- $imagePath := "" }}
|
|
{{- with .Params.image }}
|
|
{{- $imagePath = (path.Join "content" $.File.Dir "images/" .) }}
|
|
{{- end }}
|
|
|
|
<script type="application/ld+json">
|
|
{
|
|
"@context": "http://schema.org",
|
|
"@type": "BlogPosting",
|
|
"url": {{ with .OutputFormats.Get "html" }}{{ .Permalink }}{{ end }},
|
|
"mainEntityOfPage": {{ with .OutputFormats.Get "html" }}{{ .Permalink }}{{ end }},
|
|
"name": {{ .Title }},
|
|
"headline": {{ .Title }},
|
|
"datePublished": {{ .PublishDate.Format "2006-01-02T15:04:05-07:00" }},
|
|
"dateModified": {{ .PublishDate.Format "2006-01-02T15:04:05-07:00" }},
|
|
"keywords": {{ with .Params.tags }}{{ delimit . ", " }}{{ end }},
|
|
"description": {{ with .Description }}{{ . }}{{ else }}{{ .Site.Params.description }}{{ end }},
|
|
"wordCount": "{{ .WordCount }}",
|
|
"author": {
|
|
"@id": {{ printf "%s%s" .Site.BaseURL "#author" }}
|
|
},
|
|
"publisher": {
|
|
"@type": "Organization",
|
|
"name": {{ .Site.Title }},
|
|
"url": {{ .Site.BaseURL }},
|
|
"logo": {
|
|
"@type": "ImageObject",
|
|
"url": {{ "logo.png" | absURL }},
|
|
"width": "2048",
|
|
"height": "2048"
|
|
}
|
|
}{{ with (imageConfig $imagePath) }},
|
|
"image": {
|
|
"@type": "ImageObject",
|
|
"url": {{ replace $imagePath "content/" $.Site.BaseURL }},
|
|
"width": "{{ .Width }}",
|
|
"height": "{{ .Height }}"
|
|
}
|
|
{{- end }}
|
|
}
|
|
</script>
|