ld+json reworking SEO
This commit is contained in:
parent
cc0ce00a56
commit
b5388bf343
|
@ -10,8 +10,13 @@ ignorefiles = [ "content/boek/src/.*" ]
|
|||
theme = "desem-swift-theme"
|
||||
|
||||
[params]
|
||||
logo = "/images/badge.png"
|
||||
fathomid = "BUDSM"
|
||||
logo = "/images/badge.png"
|
||||
fathomid = "BUDSM"
|
||||
copyright = "Copyright 2020 Red Zuurdesem"
|
||||
description = "Red Zuurdesem: Zuurdesembrood bakken opnieuw populair maken."
|
||||
|
||||
[Author]
|
||||
name = "Wouter Groeneveld"
|
||||
|
||||
# For search functionnality
|
||||
[outputs]
|
||||
|
|
|
@ -46,39 +46,34 @@
|
|||
<meta property="og:image:height" content="260">
|
||||
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
{
|
||||
"@context": "https://schema.org",
|
||||
"@type": "WebPage",
|
||||
"breadcrumb": "Books > Bread Baking > Sourdough",
|
||||
"mainEntity":{
|
||||
"@context" : "http://schema.org",
|
||||
"@type" : "BlogPosting",
|
||||
"mainEntityOfPage": {
|
||||
"@type": "WebPage",
|
||||
"@id": "https://redzuurdesem.be/het-boek/"
|
||||
"@type" : "Book",
|
||||
"bookFormat": "http://schema.org/Paperback",
|
||||
"datePublished": "2020-05-01",
|
||||
"image": "https://redzuurdesem.be/het-boek/assets/img/efebdc275ac3846de132613bafc09033.png",
|
||||
"inLanguage": "Dutch",
|
||||
"isbn": "9789464052725",
|
||||
"name": "Red Zuurdesem: Een persoonlijke zoektocht naar de smaak en wetenschap van brood",
|
||||
"numberOfPages": "369",
|
||||
"offers": {
|
||||
"@type": "Offer",
|
||||
"availability": "http://schema.org/InStock",
|
||||
"price": "28.50",
|
||||
"priceCurrency": "EUR"
|
||||
},
|
||||
"articleSection" : "post",
|
||||
"name" : "Red Zuurdesem, het boek",
|
||||
"headline" : "Red Zuurdesem, het boek: een persoonlijke zoektocht naar de smaak en wetenschap van brood.",
|
||||
"description" : "Red Zuurdesem, het boek: een persoonlijke zoektocht naar de smaak en wetenschap van brood. Red Zuurdesem is een met liefde gebakken boek waarin traag gefermenteerde ideeën uit zowel de praktische als de theoretische wereld met succes worden gecombineerd tot één geurig geheel, rijkelijk belegd met tips en formules om zelf aan de slag te gaan.",
|
||||
"inLanguage" : "nl-BE",
|
||||
|
||||
"author" : {
|
||||
"@type": "Person",
|
||||
"name": "Wouter Groeneveld"
|
||||
},
|
||||
"publisher": {
|
||||
"@type": "Organization",
|
||||
"name": "Brain Baking",
|
||||
"logo": {
|
||||
"@type": "ImageObject",
|
||||
"url": "https://redzuurdesem.be/het-boek/assets/img/efebdc275ac3846de132613bafc09033.png"
|
||||
}
|
||||
},
|
||||
"accountablePerson" : "Wouter Groeneveld",
|
||||
"copyrightHolder" : "Wouter Groeneveld",
|
||||
"copyrightYear" : "2020",
|
||||
"datePublished": "2020-04-16 09:00:00 \x2b0000 \x2b0000",
|
||||
"dateModified" : "2020-04-16 09:00:00 \x2b0000 \x2b0000",
|
||||
"url" : "https://redzuurdesem.be/het-boek/",
|
||||
"wordCount" : "565"
|
||||
"publisher": "Brain Baking - Brave New Books",
|
||||
"aggregateRating": {
|
||||
"@type": "AggregateRating",
|
||||
"ratingValue": "4.5",
|
||||
"reviewCount": "2"
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<meta content="summary_large_image" name="twitter:card">
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
{{- end }}
|
||||
|
||||
{{- partial "opengraph" . }}
|
||||
{{- partial "ldjson-schema" . }}
|
||||
{{ $related := first 3 (where (where (where .Site.Pages.ByDate.Reverse ".Type" "==" "post") ".Params.tags" "intersect" .Params.tags) "Permalink" "!=" .Permalink) }}
|
||||
|
||||
{{ if $related }}
|
||||
|
|
|
@ -0,0 +1,63 @@
|
|||
{{ if .IsHome -}}
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
"@context": "http://schema.org",
|
||||
"@type": "WebSite",
|
||||
"name": "{{ .Site.Title }}",
|
||||
"url": "{{ .Site.BaseURL }}",
|
||||
"description": "{{ .Site.Params.description }}",
|
||||
"thumbnailUrl": "{{ .Site.Params.Logo | absURL }}",
|
||||
"license": "{{ .Site.Params.Copyright }}"
|
||||
}
|
||||
</script>
|
||||
{{ else if .IsPage }}
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
"@context": "http://schema.org",
|
||||
"@type": "BlogPosting",
|
||||
"articleSection": "{{ .Section }}",
|
||||
"name": "{{ .Title | safeJS }}",
|
||||
"headline": "{{ .Title | safeJS }}",
|
||||
"description": "{{ if .Description }}{{ .Description | safeJS }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ end }}{{ end }}",
|
||||
"inLanguage": {{ .Site.LanguageCode | default "en-us" }},
|
||||
"isFamilyFriendly": "true",
|
||||
"mainEntityOfPage": {
|
||||
"@type": "WebPage",
|
||||
"@id": "{{ .Permalink }}"
|
||||
},
|
||||
"author" : {
|
||||
"@type": "Person",
|
||||
"name": "{{ .Site.Author.name }}"
|
||||
},
|
||||
"creator" : {
|
||||
"@type": "Person",
|
||||
"name": "{{ .Site.Author.name }}"
|
||||
},
|
||||
"accountablePerson" : {
|
||||
"@type": "Person",
|
||||
"name": "{{ .Site.Author.name }}"
|
||||
},
|
||||
"copyrightHolder" : "{{ .Site.Title }}",
|
||||
"copyrightYear" : "{{ .Date.Format "2006" }}",
|
||||
"dateCreated": "{{ .Date.Format "2006-01-02T15:04:05.00Z" | safeHTML }}",
|
||||
"datePublished": "{{ .PublishDate.Format "2006-01-02T15:04:05.00Z" | safeHTML }}",
|
||||
"dateModified": "{{ .Lastmod.Format "2006-01-02T15:04:05.00Z" | safeHTML }}",
|
||||
"publisher":{
|
||||
"@type":"Organization",
|
||||
"name": {{ .Site.Title }},
|
||||
"url": {{ .Site.BaseURL }},
|
||||
"logo": {
|
||||
"@type": "ImageObject",
|
||||
"url": "{{ .Site.Params.logo | absURL }}",
|
||||
"width":"32",
|
||||
"height":"32"
|
||||
}
|
||||
},
|
||||
"image": {{ if .Params.image }}{{ .Params.image | absURL }}{{ else}}{{ if .Params.featured_image }}{{ .Params.featured_image | absURL }}{{ else }}{{.Site.Params.logo | absURL }}{{ end }}{{ end }},
|
||||
"url" : "{{ .Permalink }}",
|
||||
"wordCount" : "{{ .WordCount }}",
|
||||
"genre" : [ {{ range $index, $tag := .Params.tags }}{{ if $index }}, {{ end }}"{{ $tag }}" {{ end }}],
|
||||
"articleBody": "{{ .Content | safeJS }}"
|
||||
}
|
||||
</script>
|
||||
{{ end }}
|
|
@ -31,37 +31,4 @@
|
|||
<meta name = 'twitter:title' content = '{{ .Title }}' />
|
||||
<meta property = 'twitter:description' content = '{{ $summary }}'/>
|
||||
<meta name = 'twitter:image' content = '{{ $image }}' />
|
||||
{{- if eq .Section "blog" -}}
|
||||
{{- $date := ( .Date.Format "2006-02-01") -}}
|
||||
{{- $date := (time .Date) }}
|
||||
{{- $lastMod := (time .Lastmod) }}
|
||||
<script type = "application/ld+json">
|
||||
{
|
||||
"@context": "http://schema.org",
|
||||
"@type": "BlogPosting",
|
||||
"mainEntityOfPage":"{{ $permalink }}",
|
||||
"name": "{{ $site }}",
|
||||
"headline": {{ $title }},
|
||||
"description": {{ $summary }},
|
||||
"url": "{{ $permalink }}",
|
||||
"datePublished": {{ $date }},
|
||||
"dateModified": {{ $lastMod }},
|
||||
"author": {
|
||||
"@type": "Person",
|
||||
"name": "{{ $author }}"
|
||||
},
|
||||
"image":{
|
||||
"@type":"ImageObject",
|
||||
"url": "{{ $image }}"
|
||||
},
|
||||
"publisher": {
|
||||
"@type": "Organization",
|
||||
"logo": {
|
||||
"@type":"ImageObject",
|
||||
"url": "{{ $logo }}"
|
||||
},
|
||||
"name": "{{ $site }}"
|
||||
}
|
||||
}
|
||||
</script>
|
||||
{{- end }}
|
||||
|
||||
|
|
Loading…
Reference in New Issue