Internal twitter_cards and opengraph templates don't render site description

I’m using these internal templates in my theme in _default/partials/head.html

{{ template “_internal/twitter_cards.html” . }}
{{ template “_internal/opengraph.html” . }}

and this description in config.toml:

baseURL = “http://example.com/
title = “Example Site”
description = “Just an Example Site”

but I get this rendered markup for description (other markup deleted for clarity) in index.html in the /public site:

<meta property="og:description" content="" />
<meta name="twitter:description" content=""/>

Any ideas?

I just read the docs on those internal templates and they both say the description is from the page, not the config.

You’re right; I added an _index.md file to /content with a description and that shows up as the og and twitter description. I also added _index.md files to /content/authors/ and /content/pages/.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.