Generate Open Graph Protocol tags for your content.
Switch branches/tags
Nothing to show
Clone or download
Pull request Compare This branch is 2 commits ahead, 27 commits behind whiskyechobravo:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Open Graph

This plugin adds Open Graph Protocol tags to your articles.


To output the tags generated by this plugin, simply add this code in your template:

{% for tag in article.ogtags %}
    <meta property="{{tag[0]}}" content="{{tag[1]|striptags|e}}" />
{% endfor %}

Metadata values are constructed from the SITENAME and SITEURL settings, from the article title, from the article slug, from the article category and from these standard metadata tags:

  • date
  • modified
  • tags

Additionaly, the plugin also read these metadata tags:

  • og_image, an URL to an image that will represent your article;
  • og_description, a short description of your article. If not provided, the description will be set to summary, which is often too long;
  • og_locale, the locale of your article (e.g. 'fr_CA'). If not provided, the locale will be set to your Pelican settings LOCALE.