summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornavanchauhan <navanchauhan@gmail.com>2022-12-30 18:58:30 -0500
committernavanchauhan <navanchauhan@gmail.com>2022-12-30 18:58:30 -0500
commitb6e8cbd0b4980a4ef6e4e1e1cd2df66ef8812e04 (patch)
treead9093751ff5bda97953e26d5bbec726b4684d05
parentc5f54cb65d98de3572e5536d3a20879111b69081 (diff)
add support for custom og images
-rw-r--r--templates/base.html4
-rw-r--r--templates/post.html5
2 files changed, 4 insertions, 5 deletions
diff --git a/templates/base.html b/templates/base.html
index bc98834..fef7955 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -20,8 +20,8 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="shortcut icon" href="/images/favicon.png" type="image/png" />
<link rel="alternate" href="/feed.rss" type="application/rss+xml" title="Subscribe to Navan Chauhan" />
- <meta name="twitter:image" content="https://web.navan.dev/images/logo.png" />
- <meta name="og:image" content="https://web.navan.dev/images/logo.png" />
+ <meta name="twitter:image" content="{% block twimage %}https://web.navan.dev/images/logo.png{% endblock %}" />
+ <meta name="og:image" content="{% block ogimage %}https://web.navan.dev/images/logo.png{% endblock %}" />
<link rel="manifest" href="manifest.json" />
<meta name="google-site-verification" content="LVeSZxz-QskhbEjHxOi7-BM5dDxTg53x2TwrjFxfL0k" />
<script data-goatcounter="https://navanchauhan.goatcounter.com/count"
diff --git a/templates/post.html b/templates/post.html
index 0a66046..f229d70 100644
--- a/templates/post.html
+++ b/templates/post.html
@@ -8,6 +8,8 @@
{% block ogdescription %}{{content.metadata.description}}{% endblock %}
{% block twitterdescription %}{{content.metadata.description}}{% endblock %}
{% block twitter2description %}summary_large_image{% endblock %}
+{% block ogimage %}{{content.metadata.image_link}}{% endblock %}
+{% block twimage %}{{content.metadata.image_link}}{% endblock %}
{% block body %}
<main>
@@ -19,8 +21,5 @@
<section id="isso-thread">
<noscript>Javascript needs to be activated to view comments.</noscript>
</section>
- <!--<div class="commentbox"></div>
- <script src="https://unpkg.com/commentbox.io/dist/commentBox.min.js"></script>
- <script>commentBox('5650347917836288-proj')</script>-->
</main>
{% endblock %}