[bisq-network/bisq-website] Add Schema.org JSON-LD Microdata for SEO (Articles) (#300)
Steve Jain
notifications at github.com
Tue Dec 3 09:04:03 UTC 2019
Thanks again @RiccardoMasutti, another solid idea. However I think this one can be implemented better.
It would be _way_ better if the blog post writer didn't have to manually adjust the JSON-LD markup.
Putting the following markup in `_layouts/post.html` solves this:
```
{
"@context": "https://schema.org",
"@type": "BlogPosting",
"headline": "{{ page.title }}",
"description": "{{ page.excerpt }}",
"image": "https://bisq.network/images/bisq-fav.png",
"author": {
"@type": "Person",
"name": "{{ page.author }}"
},
"publisher": {
"@type": "Organization",
"name": "Bisq",
"logo": {
"@type": "ImageObject",
"url": "https://bisq.network/images/bisq-fav.png"
}
},
"datePublished": "{{ page.date }}",
"dateModified": "{{ page.date }}",
"mainEntityOfPage": "{{ site.url }}{{ page.url }}"
}
```
The markup above also makes the following changes:
* change `@type` to `BlogPosting` (is there a reason you picked `NewsArticle` instead?)
* change publisher `name` to "Bisq" (see [this comment](https://github.com/bisq-network/bisq-website/pull/290#discussion_r353023279))
* add `dateModified` and `mainEntityOfPage` properties, as the testing tool highly recommended them (see `mainEntityOfPage` documentation at the bottom of [this page](https://developers.google.com/search/docs/data-types/article))
As for images, perhaps we could start adding some. In any case, some posts will have images and some will not, so it would be nice to assign `image` a value based on whether or not `page.image` exists...but that's more of a "nice-to-have" feature than a "must-have" feature for now, in my opinion.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/bisq-network/bisq-website/pull/300#issuecomment-561068432
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20191203/ab35d930/attachment-0001.html>
More information about the bisq-github
mailing list