]> git.ipfire.org Git - ipfire.org.git/commitdiff
blog/index, write: use ogp module
authorRico Hoppe <rico.hoppe@ipfire.org>
Wed, 29 May 2024 13:32:00 +0000 (13:32 +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/index.html
src/templates/blog/write.html

index 1eae27bd169e8acc77a3ef6172b0b23fa55cb05f..262f4d03202417f6b9b6d447f39878ca0e7c9827 100644 (file)
@@ -3,23 +3,10 @@
 {% block title %}{{ _("Welcome!") }}{% end block %}
 
 {% block head %}
-       <!-- HTML Meta Tags -->
-       <meta name="description" content="IPFire Blog">
-
-       <!-- Facebook Meta Tags -->
-       <meta property="og:url" content="https://www.ipfire.org/blog">
-       <meta property="og:type" content="website">
-       <meta property="og:title" content="Blog - IPFire">
-       <meta property="og:description" content="{{ _("The IPFire Blog has the latest news from the IPFire Project about Development, Current Affairs, and many more interesting things.") }}">
-       <meta property="og:image" content="https://www.ipfire.org/{{ static_url("img/ipfire-tux.png") }}">
-
-       <!-- Twitter Meta Tags -->
-       <meta name="twitter:card" content="summary_large_image">
-       <meta property="twitter:domain" content="ipfire.org">
-       <meta property="twitter:url" content="https://www.ipfire.org/blog">
-       <meta name="twitter:title" content="www.ipfire.org - Blog">
-       <meta name="twitter:description" content="{{ _("The IPFire Blog has the latest news from the IPFire Project about Development, Current Affairs, and many more interesting things.") }}">
-       <meta name="twitter:image" content="https://www.ipfire.org/{{ static_url("img/ipfire-tux.png") }}">
+       {% module OpenGraph(
+               title=_("IPFire Blog"),
+               description="The IPFire Blog has the latest news from the IPFire Project about Development, Current Affairs, and many more interesting things.",
+       ) %}
 
        <!-- Feed URL -->
        <link rel="alternate" type="application/atom+xml" title="RSS" href="/blog/feed.xml" />
index 0708068ab7d3ca0f69b53a52ee449f34bc83b1c7..048f90acb3068caf4b429fc24779b91d0a3f1ff6 100644 (file)
 
 {% block head %}
        {% if post %}
-               <!-- HTML Meta Tags -->
-               <meta name="description" content={{ _("IPFire Blog - Edit %s") % post.title }}>
-               <!-- Facebook Meta Tags -->
-               <meta property="og:url" content="https://www.ipfire.org/blog/{{post.slug }}/edit">
-               <meta property="og:type" content="website">
-               <meta property="og:title" content="{{ post.title }} - IPFire">
-               <meta property="og:description" content="Edit unpublished Blog Post {{ post.title }}">
-               <meta property="og:image" content="https://www.ipfire.org/{{ static_url("img/ipfire-tux.png") }}">
-
-               <!-- Twitter Meta Tags -->
-               <meta name="twitter:card" content="summary_large_image">
-               <meta property="twitter:domain" content="ipfire.org">
-               <meta property="twitter:url" content="https://www.ipfire.org/blog/{{post.slug }}/edit">
-               <meta name="twitter:title" content="www.ipfire.org - {{ post.title }}">
-               <meta name="twitter:description" content="Edit unpublished Blog Post {{ post.title }}">
-               <meta name="twitter:image" content="https://www.ipfire.org/{{ static_url("img/ipfire-tux.png") }}">
+               {% module OpenGraph(
+                       title={{ _("IPFire Blog - Edit %s") % post.title }},
+                       description="Edit unpublished Blog Post {{ post.title }}",
+               ) %}
        {% else %}
-               <!-- HTML Meta Tags -->
-               <meta name="description" content={{ _("IPFire Blog - Write A New Post") }}>
-               <!-- Facebook Meta Tags -->
-               <meta property="og:url" content="https://www.ipfire.org/blog/write">
-               <meta property="og:type" content="website">
-               <meta property="og:title" content="Write A New Blog Post - IPFire">
-               <meta property="og:description" content="Write A New Post for the IPFire Blog">
-               <meta property="og:image" content="https://www.ipfire.org/{{ static_url("img/ipfire-tux.png") }}">
-
-               <!-- Twitter Meta Tags -->
-               <meta name="twitter:card" content="summary_large_image">
-               <meta property="twitter:domain" content="ipfire.org">
-               <meta property="twitter:url" content="https://www.ipfire.org/blog/write">
-               <meta name="twitter:title" content="www.ipfire.org - Write A New Blog Post">
-               <meta name="twitter:description" content="Write A New Post for the IPFire Blog">
-               <meta name="twitter:image" content="https://www.ipfire.org/{{ static_url("img/ipfire-tux.png") }}">
+               {% module OpenGraph(
+                       title={{ _("IPFire Blog - Write A New Post") }},
+                       description="Write A New Post for the IPFire Blog",
+               ) %}
        {% end %}
 {% end block %}