feat: add OpenGraph tags

This commit is contained in:
David Bailey 2024-01-04 16:06:06 +01:00
parent 62089b9ee2
commit 91224e634a
4 changed files with 21 additions and 0 deletions

View file

@ -11,6 +11,12 @@
<h2> {{ post.post_metadata.title }} </h2>
{% endblock %}
{% block opengraph_tags %}
<meta property="og:title" content="{{ post.post_metadata.title }}" />
<meta property="og:url" content="https://lucidragons.de{{post.post_path}}" />
{% endblock %}
{%block main_content%}
{{ include('fragments/filepath_bar.html') }}

View file

@ -6,6 +6,13 @@
<link rel="stylesheet" href="/static/imagestyle.css">
{%endblock%}
{% block opengraph_tags %}
{{ parent() }}
<meta property="og:image" content="{{post['post_file_dir']}}" />
<meta property="og:type" content="image" />
{%endblock %}
{%block content_article%}
<figure>
<a target="_blank" href="{{post['post_file_dir']}}">

View file

@ -2,6 +2,12 @@
{% extends "pathed_content.html" %}
{% block opengraph_tags %}
{{ parent() }}
<meta property="og:type" content="article" />
{%endblock %}
{%block content_article%}
{{ post['post_content']|markdown_to_html }}
{% endblock %}

View file

@ -13,6 +13,8 @@
{% block extra_head %}{% endblock %}
{% block opengraph_tags %}{% endblock %}
<script src="/static/banner.js" defer></script>
</head>
<body>