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

**URL:** https://meta.discourse.org/t/refactor-structured-data-microdata-in-itemlists-to-become-simple-listitem/220858
**Category:** Development
**Created:** [March 13, 2022, 9:23pm UTC](https://meta.discourse.org/t/refactor-structured-data-microdata-in-itemlists-to-become-simple-listitem/220858 "2022-03-13T21:23:55Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![rrit](https://avatars.discourse-cdn.com/v4/letter/r/b5ac83/32.png) [@rrit](https://meta.discourse.org/u/rrit)
#### Post date: [March 13, 2022, 9:23pm UTC](https://meta.discourse.org/t/refactor-structured-data-microdata-in-itemlists-to-become-simple-listitem/220858/1 "2022-03-13T21:23:55Z")

</div>

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 &nbsp;|&nbsp; Documentation &nbsp;|&nbsp; Google for Developers](https://developers.google.com/search/docs/advanced/structured-data/carousel?hl=en#summary-page)

> [@](#):
>
> The summary page defines an `ItemList` , where each `ListItem` has **only three properties** : `@type` (set to `ListItem` ), `position` (the position in the list), and `url` (the _URL of a page with full details_ about that item).

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

```xml
<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

```xml
<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>

```

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [March 17, 2022, 1:54am UTC](https://meta.discourse.org/t/refactor-structured-data-microdata-in-itemlists-to-become-simple-listitem/220858/2 "2022-03-17T01:54:08Z")

</div>

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

---

<div class="post-metadata">

### Author: ![rrit](https://avatars.discourse-cdn.com/v4/letter/r/b5ac83/32.png) [@rrit](https://meta.discourse.org/u/rrit)
#### Post date: [March 21, 2022, 3:46pm UTC](https://meta.discourse.org/t/refactor-structured-data-microdata-in-itemlists-to-become-simple-listitem/220858/3 "2022-03-21T15:46:18Z")

</div>

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

---

<div class="post-metadata">

### Author: ![rrit](https://avatars.discourse-cdn.com/v4/letter/r/b5ac83/32.png) [@rrit](https://meta.discourse.org/u/rrit)
#### Post date: [March 21, 2022, 5:08pm UTC](https://meta.discourse.org/t/refactor-structured-data-microdata-in-itemlists-to-become-simple-listitem/220858/4 "2022-03-21T17:08:53Z")

</div>

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

* * *

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

 ![grafik](https://global.discourse-cdn.com/meta/original/3X/6/e/6eaae47e249cd5c3ca48cff4b53813ce144e487c.png)

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

 ![grafik](https://global.discourse-cdn.com/meta/original/3X/0/1/01b6297568a557fad15630b1c6c5570dd392cef0.png)

Google resorts the actual type [DiscussionForumPosting - Schema.org Type](https://schema.org/DiscussionForumPosting) 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](https://meta.discourse.org/t/kanban-board-theme-component/118164)

 ![grafik](https://global.discourse-cdn.com/meta/original/3X/d/3/d3219590ee5f48dfb62fc4c5bc4c4207f1b34c6e.png) ![grafik](https://global.discourse-cdn.com/meta/original/3X/3/5/359472ebc453e898dbbfe47b46624024be99c2d3.png)
