<script type="application/ld+json">
{
"@type": "Blog",
"url": "{{.Site.BaseURL}}",
"headline": "{{.Site.Title}}",
"description": "{{.Site.Params.description}}",
"blogPost": [
{{ range (where .Site.Pages "Kind" "page") }}
{
"@type": "BlogPosting",
"headline": "{{.Title}}",
"name": "{{.Title}}",
"url": "{{.Permalink}}",
"mainEntityOfPage": "{{.Permalink}}",
"dateModified": "{{.Params.updateDate}}",
"datePublished": "{{.Date}}",
"author": {
"@type": "Person",
"name": "{{.Site.Params.siteAuthor}}",
"description": "{{.Site.Params.AuthorBio}}",
"image": { "@type": "ImageObject", "url": "{{.Site.Params.AuthorImage | absURL }}"}
},
"publisher": { "@type": "Organization", "name": "{{.Site.Title}}", "logo": { "@type": "ImageObject", "url": "{{.Site.Params.image | absURL}}" } },
"image": { "@type": "ImageObject", "url": "{{.Params.image | absURL}}"},
"commentCount": "0",
"comment": "",
"wordCount": {{.WordCount}}
},
{{ end }}
]
}
Here’s the output
{
“@type”: “Blog”,
“url”: “http://localhost:1313/”,
“headline”: “MY NEW HUGO WEBSITE”,
“description”: “HUGO DISCRIPTION”,
“blogPost”: [
{
"@type": "BlogPosting",
"headline": "The Full Affiliate Package",
"name": "The Full Affiliate Package",
"url": "http:\/\/localhost:1313\/full-amazon-affiliate-package-theme\/",
"mainEntityOfPage": "http:\/\/localhost:1313\/full-amazon-affiliate-package-theme\/",
"dateModified": "2020-08-23T08:07:08.341Z",
"datePublished": "2020-08-23 08:07:06.345 \u002b0000 UTC",
"author": {
"@type": "Person",
"name": "Erik Bolinder",
"description": "There is your Authoer Bio",
"image": { "@type": "ImageObject", "url": "http:\/\/localhost:1313\/images\/author.png"}
},
"publisher": { "@type": "Organization", "name": "MY NEW HUGO WEBSITE", "logo": { "@type": "ImageObject", "url": "http:\/\/localhost:1313\/images\/site_banner.png" } },
"image": { "@type": "ImageObject", "url": "http:\/\/localhost:1313\/uploads\/linux-laptop-for-programming.jpg"},
"commentCount": "0",
"comment": "",
"wordCount": 838
},
{
"@type": "BlogPosting",
"headline": "Website Title",
"name": "Website Title",
"url": "http:\/\/localhost:1313\/seo-selfie-website\/",
"mainEntityOfPage": "http:\/\/localhost:1313\/seo-selfie-website\/",
"dateModified": "2020-08-18T12:58:37.542Z",
"datePublished": "2020-08-18 12:58:36.282 \u002b0000 UTC",
"author": {
"@type": "Person",
"name": "Erik Bolinder",
"description": "There is your Authoer Bio",
"image": { "@type": "ImageObject", "url": "http:\/\/localhost:1313\/images\/author.png"}
},
"publisher": { "@type": "Organization", "name": "MY NEW HUGO WEBSITE", "logo": { "@type": "ImageObject", "url": "http:\/\/localhost:1313\/images\/site_banner.png" } },
"image": { "@type": "ImageObject", "url": "http:\/\/localhost:1313\/uploads\/graphics-card-explained.jpeg"},
"commentCount": "0",
"comment": "",
"wordCount": 1406
},
{
"@type": "BlogPosting",
"headline": "Another Post Website Title",
"name": "Another Post Website Title",
"url": "http:\/\/localhost:1313\/another-post\/",
"mainEntityOfPage": "http:\/\/localhost:1313\/another-post\/",
"dateModified": "2020-08-18T12:30:48.667Z",
"datePublished": "2020-08-18 12:30:48.646 \u002b0000 UTC",
"author": {
"@type": "Person",
"name": "Erik Bolinder",
"description": "There is your Authoer Bio",
"image": { "@type": "ImageObject", "url": "http:\/\/localhost:1313\/images\/author.png"}
},
"publisher": { "@type": "Organization", "name": "MY NEW HUGO WEBSITE", "logo": { "@type": "ImageObject", "url": "http:\/\/localhost:1313\/images\/site_banner.png" } },
"image": { "@type": "ImageObject", "url": "http:\/\/localhost:1313\/uploads\/operating-system-display.jpg"},
"commentCount": "0",
"comment": "",
"wordCount": 1268
},
]
}
</script>
I want to remove the comma in the last range, so that it doesn’t return an error!