]> git.ipfire.org Git - ipfire.org.git/commitdiff
nopaste/view: use ogp module
authorRico Hoppe <rico.hoppe@ipfire.org>
Wed, 29 May 2024 14:56:59 +0000 (14:56 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 3 Jun 2024 14:05:32 +0000 (14:05 +0000)
Signed-off-by: Rico Hoppe <rico.hoppe@ipfire.org>
src/templates/nopaste/view.html

index f8026707bfb609bc9b792469f8e30480712b9ff4..0791e743166dcef5ba898d8304333ae9e4f178ed 100644 (file)
@@ -3,22 +3,10 @@
 {% block title %}{{ paste }}{% end block %}
 
 {% block head %}
-    <!-- HTML Meta Tags -->
-    <meta name="description" content={{ _("IPFire Nopaste - %s") % {{ paste }} }}>
-    <!-- Facebook Meta Tags -->
-    <meta property="og:url" content="https://nopaste.ipfire.org/view/{{ paste.uuid }}">
-    <meta property="og:type" content="website">
-    <meta property="og:title" content="{{ page.title }} - IPFire">
-    <meta property="og:description" content="View {{ paste.subject or _("Paste") }} by {{ _("Uploaded %s by %s") % (locale.format_date(paste.time_created), paste.account or "N/A") }}">
-    <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://nopaste.ipfire.org/view/{{ paste.uuid }}">
-    <meta name="twitter:title" content="www.ipfire.org - {{ page.title }}">
-    <meta name="twitter:description" content="View {{ paste.subject or _("Paste") }} by {{ _("Uploaded %s by %s") % (locale.format_date(paste.time_created), paste.account or "N/A") }}">
-    <meta name="twitter:image" content="https://www.ipfire.org/{{ static_url("img/ipfire-tux.png") }}">
+       {% module OpenGraph(
+               title=_("IPFire Nopaste - %s" % paste),
+               description="View %s" % paste.subject or _("Paste"),
+       ) %}
 {% end block %}
 
 {% block container %}