ארגון מחדש של נתונים מובנים/microdata ב-ItemLists כדי להפוך ל-ListItem "פשוט"

סיכום מבוסס בינה מלאכותית

The discussion revolves around refactoring structured data/microdata in Discourse’s ItemLists to align with Google’s recommendation for “simple” ListItems. rrit explains that current implementations use “complex” ListItems with additional properties like name and image, which may cause Google to interpret them as full objects rather than references. To comply with Google’s guidelines for “summary” pages, ListItems should only include @type, position, and url. Two pull requests are proposed: one for the Category-View “topic-list” (#16235) and another for the Topic-View “crawler-linkback-list” (#16237). The changes aim to improve rich result validation, as demonstrated by Google’s Rich Results Test, where the updated implementation correctly treats items as references, allowing them to be included in a Carousel. sam supports the improvements and welcomes a PR.

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://global.discourse-cdn.com/meta/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>

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

PR for Crawler-View: Category-View → “topic-list”
https://github.com/discourse/discourse/pull/16235

PR for Crawler-View: Topic-View → first post → “crawler-linkback-list”
https://github.com/discourse/discourse/pull/16237


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:
Thing → CreativeWork → Article → SocialMediaPosting → DiscussionForumPosting

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