Skip to content

Commit 2925b7e

Browse files
committed
Add new cards to metadata, refs #544
1 parent 31ad170 commit 2925b7e

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

templates/item_base.html

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
11
{% extends "smallhead.html" %}
22

33
{% block extrahead %}
4-
{% if item.card_image %}
54
<meta name="twitter:card" content="summary">
6-
<meta name="twitter:image" content="{{ item.card_image }}">
7-
{% else %}
8-
<meta name="twitter:card" content="summary">
9-
{% endif %}
5+
<meta name="twitter:image" content="{% if item.card_image %}{{ item.card_image }}{% else %}https://simonwillison.net/card{{ request.path }}{% endif %}">
106
<meta name="twitter:creator" content="@simonw">
117
<meta property="og:url" content="https://simonwillison.net{{ request.path }}">
128
<meta property="og:title" content="{% block card_title %}{% endblock %}">
13-
{% if item.card_image %}<meta property="og:image" content="{{ item.card_image }}">{% endif %}
9+
<meta property="og:image" content="{% if item.card_image %}{{ item.card_image }}{% else %}https://simonwillison.net/card{{ request.path }}{% endif %}">
1410
<meta property="og:type" content="article">
1511
<meta property="og:description" content="{% block card_description %}{% endblock %}">
1612
<meta property="og:updated_time" content="{{ item.created_unixtimestamp }}">

0 commit comments

Comments
 (0)