[bisq-network/bisq-website] Add Schema.org JSON-LD Microdata for SEO (Articles) (#300)

Riccardo Masutti notifications at github.com
Tue Dec 3 15:23:26 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 for each post they write.
> 
> 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.

That's awesome! Didn't know about ready-to-use variables. I added the markup in `_layouts/post.html`.

If I had known before I would not have lost 2 hours to add them manually article by article :D

Let me remove again the added content and this PR should be ready to merge

-- 
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-561216432
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20191203/94f1c9f0/attachment.html>


More information about the bisq-github mailing list