]> git.ipfire.org Git - ipfire.org.git/commitdiff
nopaste/view: add ogp metadata
authorRico Hoppe <rico.hoppe@ipfire.org>
Sat, 11 May 2024 10:24:03 +0000 (10:24 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 3 Jun 2024 14:05:09 +0000 (14:05 +0000)
Signed-off-by: Rico Hoppe <rico.hoppe@ipfire.org>
src/templates/nopaste/view.html

index 5ba3ad6ce33686ebe023bb48f90a96b60f061e0d..f8026707bfb609bc9b792469f8e30480712b9ff4 100644 (file)
@@ -2,6 +2,25 @@
 
 {% 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") }}">
+{% end block %}
+
 {% block container %}
        <section class="hero is-primary">
                <div class="hero-body">