Topic structured data: all posts declared as "mainEntityOfPage"

In the structured data model there should be only one object declared as mainEntity / mainEntityOfPage.
See “mainEntity” - Background information - Data Model -

Right now every single post is declared to be the mainEntityOfPage.

Google sees every page (= url) as its own context. Thereby it is possible to declare one post for each url as mainEntity – e.g.

  • https://DOMAIN/t/SLUG/43: main entity is #post_1
  • https://DOMAIN/t/SLUG/43?page=2: main entity is one of #post_10 to #post_19
  • https://DOMAIN/t/SLUG/43?page=3: main entity is one of #post_20 to #post_29
  • […]

See also Discussion for on “pagination of ItemLists” and Google: pagination for ItemList · Issue #1714 · schemaorg/schemaorg · GitHub

  • pagination for ItemList · Issue #1714 · schemaorg/schemaorg · GitHub
  • pagination for ItemList · Issue #1714 · schemaorg/schemaorg · GitHub

The above excerpt from Google’s developer documentation might be outdated as it is missing right now: General Structured Data Guidelines | Google Search Central  |  Google Developers

Does this not relate to the use of: DiscussionForumPosting - Type

We use this for every single post, it looks like we should only use it for the first post and then use Comment - Type for the rest.

That way we get rid of all the repeat titles pagination stuff and and the rest of things that are not a good fit.

1 Like

Google may not really care about sub-types like DiscussionForumPosting and map these to the ancestor type Article instead.
By doing this Discourse might look more like a blog with Articles plus Comments from Googles perspective.

Maybe another way is to make the relations between DiscussionForumPostings more clear:
e.g. by using about - Property to declare the parent post inside each answer.

post_1 (mainEntityOfPage)
+-- post_2 (about post_1)
+-- post_3 (about post_1)
|   |
|   + post_4 (about post_3)
|   + post_6 (about post_3)
+ post_5 (about post_1)

There is a discussion on how to use DiscussionForumPosting:

One opinion - see: We have DiscussionForumPosting but no DiscussionForum... · Issue #125 · schemaorg/suggestions-questions-brainstorming · GitHub

The description of DisccussionForumPosting is “A posting to a discussion forum.”.

A typical forum is made up of categories. Categories contain forums, and a forum contains topics. A topic contains 1 or more forum posts.

The description seems to indicate that this schema is for an individual forum post but the example seems to show it is for a topic which can have multiple forum posts from multiple authors.

1 Like