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

View file

@ -10,6 +10,7 @@
<link rel="stylesheet" href="/static/css/feather.css" />
<link rel="manifest" href="/manifest.json" />
<link rel="icon" type="image/png" href="/static/icons/trwnh/feather-filled/plumeFeatherFilled64.png">
{% block head %}{% endblock head %}
</head>
<body>
<header>

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 %}