Skip to content

Commit

Permalink
feat: add OpenGraph image
Browse files Browse the repository at this point in the history
  • Loading branch information
wzyboy committed Aug 10, 2023
1 parent 0b296cb commit 359dde1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions templates/tweet.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@
{% block title %}Tweet ID {{ tweet['id'] }}{% endblock %}

{% block head_meta %}
<meta name="description" content="{{ tweet.content_text or tweet.full_text or tweet.text }}" />
<meta property="og:title" content="@{{ tweet.user.screen_name }}" />
<meta property="og:description" content="{{ tweet.content_text or tweet.full_text or tweet.text }}" />
{%- if images %}
<meta property="og:image" content="{{ image[0].url }}">
{%- endif %}
{% endblock %}


Expand Down

0 comments on commit 359dde1

Please sign in to comment.