In this Support thread titled “Blogger posts have no snippet,” joao_pimentel_ferrei asks why Blogger posts don’t generate rich snippets in Discourse, unlike WordPress. Falco explains that Discourse relies on OpenGraph meta tags (like og:title, og:description, etc.) and recommends testing with Iframely. joao_pimentel_ferrei confirms trying to add OpenGraph tags via Blogger’s template but notes that Discourse still doesn’t render snippets, even though Iframely fetches them correctly. Eventually, joao_pimentel_ferrei shares a working solution: inserting OpenGraph tags before </head> in the Blogger template, including dynamic values like data:blog.pageName and data:blog.canonicalUrl, and adding og:description after <data:post.body/> using data:post.snippet or a custom snippet function. A test post confirms success. In a final note, joao_pimentel_ferrei asks why favicons aren’t appearing despite being enabled, linking to a site as an example.
Any reason why the blogger posts do not generate a snippet?
For example, on this blogger post, I paste a URL, and merely the URL appears:
But on Wordpress, normally, a snippet appears.
Which meta-info or HTML tags Discourse gets to generate a snippet?
Which information shall one have in a blogger post, such that a sinipet is generated?
A typical blog post will have OpenGraph tags in the head seaction, like:
<meta property="og:site_name" content="Discourse Blog">
<meta property="og:url" content="https://blog.discourse.org/2018/05/discourse-2-0-released/">
<meta property="og:title" content="Discourse 2.0 released!">
<meta property="og:description" content="We released Discourse 2.0 on May 31st, building on Discourse 1.9 from January. New Admin Dashboard We’ve completely redesigned the admin dashboard to show off your most relevant and essential community health metrics right at the top, as well as trending searches. Shared Drafts Staff can designate a category for shared drafts, and pre-compose topics that only other staff can see for review prior to posting. After posting, all logged edits are removed so the history is clean, and the timestamp is reset, too. Reply mode toggle While composing a […]">
The og:description is not fetched inside <head> since the variable data:post is not available in <head>. You must add in the template right after the line <data:post.body/> the following line: