]> git.ipfire.org Git - ipfire.org.git/commitdiff
blog/post: use ogp module
authorRico Hoppe <rico.hoppe@ipfire.org>
Tue, 28 May 2024 16:23:15 +0000 (16:23 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 3 Jun 2024 14:05:10 +0000 (14:05 +0000)
Signed-off-by: Rico Hoppe <rico.hoppe@ipfire.org>
src/templates/blog/post.html

index 596f4aaeaa9003fac4aa9b8b772a32a8706d7c99..aeb8e290954c0efcb2964c5b42c23f93c1ed2f45 100644 (file)
@@ -5,14 +5,12 @@
 {% block meta %}
        {% import ipfire.accounts as accounts %}
 
-       <!-- Facebook OpenGraph -->
-       <meta property="og:site_name" content="IPFire Blog" />
-       <meta property="og:title" content="{{ post.title }} - The IPFire Blog" />
-       <meta property="og:description" content="{{ post.excerpt }}" />
-       <meta property="og:url" content="{{ request.full_url() }}" />
-       <meta property="og:image" content="{{ static_url("img/ipfire-tux.png") }}" />
-
-       <meta property="og:type" content="article" />
+       {% module OpenGraph(
+               type="article",
+               title=post.title,
+               description=post.excerpt,
+       ) %}
+
        {% if post.published_at %}
                <meta property="og:article:published_time" content="{{ post.published_at.isoformat() }}" />
        {% end %}
        {% for tag in post.tags %}
                <meta property="og:article:tag" content="{{ tag }}" />
        {% end %}
-
-       <!-- Twitter -->
-       <meta property="twitter:site" content="@ipfire" />
-       <meta property="twitter:card" content="summary_large_image" />
-       <meta property="twitter:title" content="{{ post.title }} - The IPFire Blog" />
-       <meta property="twitter:description" content="{{ post.excerpt }}" />
-       <meta property="twitter:image" content="{{ static_url("img/ipfire-tux.png") }}" />
 {% end block %}
 
 {% block container %}