Add OpenGraph metadata

This commit is contained in:
Baptiste Gelez
2018-10-31 16:10:50 +01:00
parent 68a30cc80e
commit 67077267cf
2 changed files with 13 additions and 0 deletions
+12
View File
@@ -1,6 +1,18 @@
{% extends "base" %}
{% import "macros" as macros %}
{% block head %}
<meta property="og:title" content="{{ article.post.title }}"/>
<meta property="og:type" content="article"/>
{% if article.cover %}
<meta property="og:image" content="{{ article.cover.url | safe }}"/>
{% endif %}
<meta property="og:url" content="{{ article.url | safe }}"/>
{% if article.post.subtitle %}
<meta property="og:description" content="{{ article.post.subtitle }}"/>
{% endif %}
{% endblock head %}
{% block title %}
{{ article.post.title }}
{% endblock title %}