Request for Dynamic Schema.org in Theme Components

AI-generated summary

The discussion revolves around adding dynamic Schema.org JSON-LD to Discourse themes for topics and replies. Aditya_Shevle requests this feature to improve SEO and rich search results, suggesting automatic generation of schema data for topic titles, authors, creation dates, and reply authors, dates, and content. However, RGJ points out that Discourse already provides JSON-LD for topics in the crawler view, providing an example of the existing schema markup. Aditya_Shevle responds, stating that they cannot see the schema markup in the topic page source code, and RGJ clarifies that the JSON-LD is only visible in a special view for crawlers, not in the regular view.

Hi,

I’d like to request the ability to add dynamic Schema.org JSON-LD for created topics and their replies in Discourse themes. It would be helpful to automatically generate schema data for:

Topic: Title, author, and creation date
Replies: Author, reply date, and content

This would significantly improve SEO and help with rich search results, making it easier for search engines to understand both topics and replies.

Is there anyway to fullfill this requirement?

Thank you

Why would you need this in theme components?

BTW The crawler view already provides JSON-LD for topics.

<script type="application/ld+json">
{
   "@context":"http://schema.org",
   "@type":"QAPage",
   "name":"Request for Dynamic Schema.org in Theme Components",
   "mainEntity":{
      "@type":"Question",
      "name":"Request for Dynamic Schema.org in Theme Components",
      "text":"Hi,\n\nI'd like to request the ability to add dynamic <a href=\"http://Schema.org\" rel=\"noopener nofollow ugc\">Schema.org<\/a> JSON-LD for created topics and their replies in Discourse themes. It would be helpful to automatically generate schem
a data for:\n\nTopic: Title, author, and creation date\n\nReplies: Author, reply date, and content\n\nThis would significantly&hellip;",
      "upvoteCount":0,
      "answerCount":0,
      "datePublished":"2025-04-25T05:13:40.289Z",
      "author":{
         "@type":"Person",
         "name":"Aditya_Shevle",
         "url":"https://meta.discourse.org/u/Aditya_Shevle"
      }
   }
}
</script>

Hi,

Thank you for your response. However, when I view the source code of the topic page, I don’t see any schema markup. Is there a way to enable or add it?

Thank you

Discourse provides a special view to crawlers. Since the JSON-LD is not meant for human consumption, it is not in the regular view.