Different schema type for Topics and Posts

Continuing the discussion from Invalid Article Schema:

Currently we are using schema type DiscussionForumPosting for every post in a topic. So if a topic having 5 posts totally then in same page we rendering DiscussionForumPosting 5 times.

In this case I think it’s better to use DiscussionForumPosting only once for whole topic and Comment schema type for remaining 4 replies like below.

<div itemscope itemtype="http://schema.org/DiscussionForumPosting">

   <span itemprop="datePublished">10/05/2017</span>
	<span itemprop="headline">Sample Topic Title</span>
	<span itemprop="image">https://meta.discourse.org/image-url9.png</span>
	<div itemprop="articleBody">Topic's First Post Content</div>
    <span itemprop="author">User 1</span>
    
 	<div itemprop="comment" itemscope itemtype="http://schema.org/Comment">
    	<span itemprop="author">User 2</span>
    	<div itemprop="text">Second Post Content</div>
 	</div>
 
 	<div itemprop="comment" itemscope itemtype="http://schema.org/Comment">
    	<span itemprop="author">User 3</span>
    	<div itemprop="text">Third <b>Post</b> Content</div>
 	</div>
 
</div>
3 Mi Piace

Why? What problem does this solve?

2 Mi Piace

It won’t solve any big issue :slight_smile:

Since we are using DiscussionForumPosting schema for every post Google requiring valid image property for all posts. If we used DiscussionForumPosting only once for topic then we can skip this issue. And I guess this is the correct way to do.

1 Mi Piace

Currently i have not seen above schema method in discourse.

Is this method are in work in progress?

I have found one image error in schema testing tool as below.

Also, I want to hide “datePublished” items from google serp. Can anyone guide me how to do that?

No. Currently I am not sure about this change 100%. I’m unable to find any resource that recommending Comment schema type for reply posts.

Not error. It is just a warning. Google recommending the image field if available.

It is a required field.

2 Mi Piace

I am looking to hide published date shown from google search only.

I search “Different schema type for Topics and Posts” on google and found below post.

Discourse%20Date%20Snapshot%202

It is not recommended. You have to override the show.html.erb template file with a plugin to achieve it.

6 Mi Piace

When search “Change the domain name or rename my Discourse?” found the below article but shows the date in google serp search that when article was published 1st time in 2014.

After that there are 7 revision made on that post and last updated date in 09th December 2017.

So is there anyway to set in forum or made any changes for google to pickup “last update date” instead of “date published” ?

Google%20Structured%20Data%20Snapshot%202

I hope everyone understand my doubt. If anyone show tutorial post on google search result but that are showing 4 years backdated then there are less chances to click.

6 Mi Piace

Ah yes, excellent point, we should check the HTML metadata there @vinothkannans to make sure for wiki posts it is using date of last edit and not date of initial posting.

7 Mi Piace

We previously only used created_at date in datePublished schema property. Now if a post is updated then the updated_at date will used in dateModified schema property along with existing datePublished property. I did it for all the posts. Since we now including both the dates it won’t be a issue. Google search already respecting the both.

https://github.com/discourse/discourse/commit/2c12336c6b7c8223d4fa00b2e928e276224f05a5

8 Mi Piace

pr-welcome tag added

1 Mi Piace

So che questo è un thread molto vecchio, ma volevo solo esprimere il mio supporto per questo approccio. In futuro seguirò con canali/raccomandazioni più ufficiali, ma volevo solo segnalarlo qui perché era una tua idea.

Mi chiamo Ryan Levering e mi occupo dell’ingestione di dati strutturati in Google (questo tizio). Discourse è una sorta di caso unico in quanto è uno dei pochi motori di forum che utilizza i DFP a livello di radice per ogni commento nel thread. Questo ci rende più difficile capire il tipo di pagina E rilevare in modo autorevole il post principale sulla pagina.

Consiglieremo a tutti di utilizzare DiscussionForumPosting per l’OP e quindi di allegare il resto delle risposte al post originale come comment - Schema.org Property, esattamente come raccomandato nell’OP qui. Altri markup sarebbero utili (come statistiche di interazione utente, ad esempio), ma quella ristrutturazione farebbe molto per rendere più facile includere i forum di Discourse nelle nostre funzionalità.

13 Mi Piace

Ciao Ryan,

Grazie per avercelo comunicato. Apporteremo le modifiche necessarie il prima possibile.

5 Mi Piace

Questa PR implementerà il comportamento consigliato sopra.

10 Mi Piace

Non sono sicuro di quanto questo sia correlato a ciò che stai facendo, ma Google sta avendo problemi a rilevare post/argomenti sul mio sito. Gli URL canonici potrebbero avere un certo effetto su come determini il post principale esatto sulla pagina.

Ho appena ricevuto un Google Alert che un URL di post come questo è indicizzato:

  • https://forum.example.com/t/the-slug/123/16

Google Search Console conferma che l’URL esatto è indicizzato su “su Google”.

Ma l’URL canonico che Google ha recuperato è diverso:

<link rel="canonical" href="https://forum.example.com/t/the-slug/123" />

Con il modo in cui Discourse è attualmente configurato, quegli URL di post non dovrebbero essere indicizzati perché gli URL canonici puntano tutti all’argomento.

Se vuoi vedere quel tipo di URL indicizzati, imposta un Google Alert per qualcosa come site:meta.discourse.org e “tutti i risultati nel momento in cui accadono”.

Non sono un esperto di canonizzazione, quindi non dovrei dire qualcosa di sbagliato qui. Ma sono abbastanza sicuro che non sia correlato. Per quanto ne so, il markup non viene utilizzato affatto nella canonizzazione. E anche se immagino che potrebbe essere possibile confondere i sistemi avendo un URL non canonico con del markup che dice mainEntityOfPage: (in modo che sembrasse che il markup stesse affermando che era il post principale da una pagina diversa), non l’ho ancora visto accadere.

Già che ci siamo, Discourse afferma attualmente che ogni commento/post non primo è mainEntityOfPage: . Credo che sarà vero anche dopo la correzione. Questo confonde anche il rilevamento (e significa che dobbiamo abbandonare del tutto tale asserzione). Penso che con la correzione ci darà abbastanza segnale per prevenire problemi ora, ma probabilmente è meglio usarlo solo sul primo post.

6 Mi Piace

Questo è in fase di risoluzione ora:

@rrlevering Se hai tempo libero, apprezzerei molto un tuo feedback su questo:

3 Mi Piace