# 博客文章没有摘要

**URL:** <https://meta.discourse.org/t/blogger-posts-have-no-snippet/89290>\
**Category:** Support\
**Created:** [2018年六月6日 20:35 UTC](https://meta.discourse.org/t/blogger-posts-have-no-snippet/89290 "2018-06-06T20:35:47Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![joao\_pimentel\_ferrei](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/joao_pimentel_ferrei/32/115365_2.png) [@joao\_pimentel\_ferrei](https://meta.discourse.org/u/joao_pimentel_ferrei)\
**Post date:** [2018年六月6日 20:35 UTC](https://meta.discourse.org/t/blogger-posts-have-no-snippet/89290/1 "2018-06-06T20:35:47Z")

</div>

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:

> **[Transportes, os dados que os economistas não publicam](https://www.veraveritas.eu/2018/06/transportes-os-dados-que-os-economistas.html)**
>
> Não que acredite que numa ciência que se quer analítica e exata quanto possível haja matérias tabus, mas não deixa de ser interessante que em todas as soluções energético-económicas, em nenhuma delas com impacto mediático de relevo, observamos os...

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?

thank you

---

<div class="post-metadata">

**Author:** ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)\
**Post date:** [2018年六月6日 20:42 UTC](https://meta.discourse.org/t/blogger-posts-have-no-snippet/89290/2 "2018-06-06T20:42:13Z")

</div>

For testing we recommend using [Iframely](https://iframely.com/embed/https%3A%2F%2Fwww.veraveritas.eu%2F2018%2F06%2Ftransportes-os-dados-que-os-economistas.html).

A typical blog post will have [OpenGraph](http://ogp.me) tags in the head seaction, like:

```plaintext
<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 […]">

```

---

<div class="post-metadata">

**Author:** ![joao\_pimentel\_ferrei](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/joao_pimentel_ferrei/32/115365_2.png) [@joao\_pimentel\_ferrei](https://meta.discourse.org/u/joao_pimentel_ferrei)\
**Post date:** [2018年九月7日 21:37 UTC](https://meta.discourse.org/t/blogger-posts-have-no-snippet/89290/3 "2018-09-07T21:37:51Z")

</div>

Thanks a lot. Apologies to ask again after this time, but I’ve been around trying to [insert that on my blogger blog template](http://www.addthis.com/academy/how-to-add-open-graph-tags-using-blogger/)

Does it take time to fetch/update?

The tester you suggested [seems to fetch the code correctly](https://iframely.com/embed/https%3A%2F%2Fwww.veraveritas.eu%2F2014%2F04%2Fferrovia-ou-rodovia.html) but here the discourse still does not render the snippet.

> **[Ferrovia ou rodovia, o que é melhor para Portugal e para a Europa](https://www.veraveritas.eu/2014/04/ferrovia-ou-rodovia.html)**
>
> Tem-se debatido muito sobre, se Portugal e os restantes países europeus, devem ou não reinvestir na ferrovia em comparação com os investimentos substanciais que se fizeram nas últimas décadas em rodovia, e muito particularmente em autoestradas....

---

<div class="post-metadata">

**Author:** ![joao\_pimentel\_ferrei](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/joao_pimentel_ferrei/32/115365_2.png) [@joao\_pimentel\_ferrei](https://meta.discourse.org/u/joao_pimentel_ferrei)\
**Post date:** [2018年九月9日 17:37 UTC](https://meta.discourse.org/t/blogger-posts-have-no-snippet/89290/4 "2018-09-09T17:37:10Z")

</div>

Thanks, finally I solved everything.

For blogger, I used this code, which I inserted right before the tag `</head>` in the blogger’s template

```plaintext
    <!-- OpenGraph starts-->
    <meta content='article' property='og:type'/>
    <meta expr:content='data:blog.title' property='og:site_name'/>
    
	<!-- Title and URL -->
    <meta expr:content='data:blog.pageName' property='og:title'/>
    <meta expr:content='data:blog.canonicalUrl.https' property='og:url'/>
		
    <!-- Image -->
	<b:if cond='data:blog.postImageThumbnailUrl'>
		<meta expr:content='data:blog.postImageThumbnailUrl' property='og:image'/>
    <b:elseif cond='data:blog.postImageUrl'/>
    	<meta expr:content='data:blog.postImageUrl' property='og:image'/>    
	<b:else/>
    	<meta content='YOUR_LOGO_URL' property='og:image'/> 
    </b:if>

	<meta expr:content='&quot;pt_PT&quot;' property='og:locale'/>

    <!-- OpenGraph ends-->

```

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:

```plaintext
<meta expr:content='data:post.snippet' property='og:description'/>

```

If you want a costumized snippet you may use this instead

```plaintext
<meta expr:content='snippet(data:post.body, { length: 150, links: false, linebreaks: false })' property='og:description'/>

```

now it seems to work smoothly, here’s a test 🙂 (please, it’s not spam, it’s _merely_ a test showing that it does work here in discourse)

> **[A origem e o anacronismo do medo](https://www.veraveritas.eu/2014/07/a-origem-e-o-anacronismo-do-medo.html)**
>
> A origem: a proteção na savana, na selva e na floresta! 
> A origem do medo remonta a princípios antropológicos de defesa pessoal e coletiva. O medo instintivo ou inato pode ser cientificamente explicado através da psicologia evolutiva . Já o medo...

---

<div class="post-metadata">

**Author:** ![joao\_pimentel\_ferrei](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/joao_pimentel_ferrei/32/115365_2.png) [@joao\_pimentel\_ferrei](https://meta.discourse.org/u/joao_pimentel_ferrei)\
**Post date:** [2019年二月18日 22:00 UTC](https://meta.discourse.org/t/blogger-posts-have-no-snippet/89290/5 "2019-02-18T22:00:19Z")

</div>

and btw, why there’s no favicon when all the favicons are enabled?

> **[Calculadora dos Custos do Automóvel – Descubra o verdadeiro custo do seu carro!](https://autocosts.info/pt)**
>
> O custo médio total em Portugal é de €3902 por ano, representando um encargo médio equivalente a 1.5 meses de salário

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)\
**Post date:** [2022年三月14日 19:00 UTC](https://meta.discourse.org/t/blogger-posts-have-no-snippet/89290/6 "2022-03-14T19:00:15Z")

</div>


