Refactor structured data/microdata in ItemLists to become "simple" ListItem

Discourse uses microdata ItemLists with ListItems in different places.

Some of these ListItems are only references/links to the actual object and do not represent an object by themselves. See ItemLists:

  • Crawler-View: Category-View → “topic-list”
  • Crawler-View: Topic-View → first post → “crawler-linkback-list”

Because these ListItems are only references, we can call the enclosing ItemLists a “summary”.
For a “summary” Google recommends to use a “simple” List:

See: Carousel (ItemList) Structured Data | Google Search Central  |  Documentation  |  Google for Developers

Google might see a “complex” ListItem with more properties set as an object for itself - thereby introducing new objects on the List-page instead of just referencing to the original object(-url).


e.g. Crawler-View: Category-View → “topic-list”

“complex” List - current state

<div itemscope="" itemtype="http://schema.org/ItemList">
  <meta itemprop="itemListOrder" content="http://schema.org/ItemListOrderDescending">
  <table class="topic-list">
    [...]
    <tbody class="topic-list-body">
        [...]
        <tr class="topic-list-item">
          <td class="main-link topic-list-data" itemprop="itemListElement" itemscope="" itemtype="http://schema.org/ListItem">
            <meta itemprop="name" content="Remove wrong structured data from every subpage – add &quot;Sitelinks Search Box&quot; to the homepage only">
            <meta itemprop="url" content="https://meta.discourse.org/t/remove-wrong-structured-data-from-every-subpage-add-sitelinks-search-box-to-the-homepage-only/219299">
              <meta itemprop="image" content="https://d11a6trkgmumsb.cloudfront.net/optimized/3X/6/8/68d84f5836ecc992fe21d08e05225eb57e47da38_2_1024x778.png">
            <meta itemprop="position" content="2">
            [...]
        </tr>
        [...]
    </tbody>
  </table>
</div>

“simple” List - pseudo code

<div itemscope="" itemtype="http://schema.org/ItemList">
  <table class="topic-list">
    [...]
    <tbody class="topic-list-body">
        [...]
        <tr class="topic-list-item">
          <td class="main-link topic-list-data" itemscope="" itemtype="http://schema.org/ListItem">
            <meta itemprop="url" content="https://meta.discourse.org/t/remove-wrong-structured-data-from-every-subpage-add-sitelinks-search-box-to-the-homepage-only/219299">
            <meta itemprop="position" content="2">
            [...]
        </tr>
        [...]
    </tbody>
  </table>
</div>
2 Likes

I am certainly open to improving stuff here, would be interested in seeing a PR.

1 Like

PR for Crawler-View: Category-View → “topic-list”

1 Like

PR for Crawler-View: Topic-View → first post → “crawler-linkback-list”


Current state - see https://search.google.com/test/rich-results/result?id=rZ2rScT4qsLi5K8uwJDtUQ&hl=en

With PR implemented - see https://search.google.com/test/rich-results/result?id=lJrsyBggKH6Cx5FPH65rXg&hl=en

Google resorts the actual type DiscussionForumPosting - Schema.org Type to its parent type Article:
ThingCreativeWorkArticleSocialMediaPostingDiscussionForumPosting

The “missing” 18 Articles are actually references to Articles only and are listed in the new Carousel now.
E.g. see Kanban Board Theme Component

1 Like