Martin James
Martin James

Reputation: 930

How can I correctly implement Schema.org with multiple lists using JSON-LD?

I am implementing Schema.org structured data into my magazine-style website and have a couple of concerns regarding the use of multiple lists.

I have two sections on my home page: 'Most Recent' and 'Most Popular'. Both sections contain five mini-articles each. I have considered both of these sections as 'lists'. This is an example of one section - the other is identical apart from the articles, obviously:

enter image description here

This is my Schema JSON-LD. I have cut this sample short at ... for the sake of keeping the sample easily readable and have removed domains/names, etc. So far, I have only added the five articles from 'Most Recent' to this ItemList and testing it using Google's Structured Data Testing Tool returns zero warnings and zero errors:

<script type="application/ld+json">
    {
        "@context": "http://schema.org",
        "@type": "ItemList",
        "numberOfItems": "5",
        "itemListOrder": "Descending",
        "itemListElement": [
            {
                "@type": "Article",
                "position": "1",
                "mainEntityOfPage": {
                    "@type": "WebPage",
                    "@id": "/motoring/audi-launches-2019-sq8-tdi/"
                },
                "articleSection": "Motoring",
                "headline": "Audi launches 2019 SQ8 TDI",
                "datePublished": "2019-09-01",
                "dateModified": "2019-09-01",
                "image": "/content/uploads/2019/08/2019-audi-sq8-tdi-001-800.jpg",
                "url": "/motoring/audi-launches-2019-sq8-tdi/",
                "author": "The Author",
                "publisher": {
                    "@type": "Organization",
                    "name": "Company Name",
                    "url": "https://company.name",
                    "logo": {
                        "@type": "ImageObject",
                        "url": "https://company.name/logo.png"
                    },
                    "founder": "Founder",
                    "foundingDate": "2019"
                }
            },
            {
                "@type": "Article",
                "position": "2",
                "mainEntityOfPage": {
                    "@type": "WebPage",
                    "@id": "/gadgets-tech/meet-keysmart-the-smart-key-oraganiser/"
                },
                "articleSection": "Gadgets & Tech",
                "headline": "Meet Keysmart: The smart key organiser",
                "datePublished": "2019-09-01",
                "dateModified": "2019-09-01",
                "image": "/content/uploads/2019/08/the-smartkey-orgainser-001-800.jpg",
                "url": "/gadgets-tech/meet-keysmart-the-smart-key-oraganiser/",
                "author": "The Author",
                "publisher": {
                    "@type": "Organization",
                    "name": "Company Name",
                    "url": "https://company.name",
                    "logo": {
                        "@type": "ImageObject",
                        "url": "https://company.name/logo.png"
                    },
                    "founder": "Founder",
                    "foundingDate": "2019"
                }
            },
            ...
        ]
    }
</script>

However, as mentioned above, this ItemList is only for the five 'Most Recent' articles. I would now like to add structured data for the other section, 'Most Popular', and not sure how best to approach it.

  1. Do I add the most popular five articles to the same ItemList, do I create a new ItemList or do I create a new script/JSON? How is this best achieved? Please provide an example.
  2. Do I really need to add publisher/organization for each article like I have or can this be shortened somehow? It seems unnecessarily bulky doing it as I have. I have read that adding 'Organization' data to every page is bad practice (see link below) - does this apply here?
  3. Each of these mini-articles points to a full article using mainEntityOfPage. Am I right using type 'WebPage' or should I be using type 'Article'?
  4. If two lists are required, is there a way of telling search engines that one list contains most recent items and one contains most popular or is that unnecessary?

https://www.searchenginejournal.com/google-do-not-put-organization-schema-markup-on-every-page/289981/

Upvotes: 1

Views: 2701

Answers (1)

Ezra Siton
Ezra Siton

Reputation: 7741

In general use HTML5 semantic element (main, section and so on) + Correct site outliner (H2 for each list and so on).

Two lists

About your schema. The best idea is to think in "microdata" view.

Your list is not nested

<ul>
  <li>
    <ul><li></li></ul>
  </li>
  <li>
    <ul><li></li></ul>
  </li>
</ul>

Nested lists example: https://schema.org/OfferCatalog#offer-3

Use multiple json-ld scripts

In this case, I think the best/simple idea is to use two seperate lists "objects" (And add name/url/and so on for each list) - Example outline (Missing properties for short code):

<script type="application/ld+json">
    {
        "@context": "http://schema.org",
        "@type": "ItemList",
        "name": "Recent Articles",
        "numberOfItems": "1",
        "itemListOrder": "Descending",
        "itemListElement": [
            {
                "@type": "Article",
                "position": "1",
                "headline": "I am recent Article"
            }          
        ]

    }
</script>
<script type="application/ld+json">
    {
        "@context": "http://schema.org",
        "@type": "ItemList",
        "name": "Popular Articles",
        "numberOfItems": "1",
        "itemListOrder": "Descending",
        "itemListElement": [
            {
                "@type": "Article",
                "position": "1",
                "headline": "I am Popular Article"
            }          
        ]    
    }
</script>

enter image description here

https://webmasters.stackexchange.com/questions/96903/can-i-have-multiple-json-ld-scripts-in-the-same-page

Publisher as itemref

Try this idea:

Example (Refernce Organization object to Article):

<!-- Organization -->
<script type="application/ld+json">
{
    "@context": "http://schema.org",
    "@type": "Organization",
    "@id": "#Organization-name",
    "name": "My Organization"
}
</script>
<!-- Recent Articles -->
<script type="application/ld+json">
    {
        "@context": "http://schema.org",
        "@type": "ItemList",
        "name": "Recent Articles",
        "numberOfItems": "1",
        "itemListOrder": "Descending",
        "itemListElement": [
            {
                "@type": "Article",
                "position": "1",
                "headline": "I am recent Article",
                "publisher": {
                 "@id": "#Organization-name"
                 }
            }          
        ]
    }
</script>
<!-- Popular Articles -->
<script type="application/ld+json">
    {
        "@context": "http://schema.org",
        "@type": "ItemList",
        "name": "Popular Articles",
        "numberOfItems": "1",
        "itemListOrder": "Descending",
        "itemListElement": [
            {
                "@type": "Article",
                "position": "1",
                "headline": "I am Popular Article",
                 "publisher": {
                     "@id": "#Organization-name"
                 }
            }          
        ]    
    }
</script>

Testing-tool output: testing-tool

mainentityofpage

Read this: https://webmasters.stackexchange.com/questions/87940/new-required-mainentityofpage-for-article-structured-data

Upvotes: 3

Related Questions