about summary refs log tree commit diff
path: root/bskyweb/templates/post.html
diff options
context:
space:
mode:
Diffstat (limited to 'bskyweb/templates/post.html')
-rw-r--r--bskyweb/templates/post.html7
1 files changed, 5 insertions, 2 deletions
diff --git a/bskyweb/templates/post.html b/bskyweb/templates/post.html
index 963af2065..6473bc284 100644
--- a/bskyweb/templates/post.html
+++ b/bskyweb/templates/post.html
@@ -14,7 +14,7 @@
   <meta property="profile:username" content="{{ profileView.Handle }}">
   {%- if requestURI %}
   <meta property="og:url" content="{{ requestURI }}">
-  <link rel="canonical" href="{{ requestURI }}" />
+  <link rel="canonical" href="{{ requestURI|canonicalize_url }}" />
   {% endif -%}
   {%- if postView.Author.DisplayName %}
   <meta property="og:title" content="{{ postView.Author.DisplayName }} (@{{ postView.Author.Handle }})">
@@ -24,15 +24,18 @@
   {%- if postText %}
   <meta name="description" content="{{ postText }}">
   <meta property="og:description" content="{{ postText }}">
+  <meta property="twitter:description" content="{{ postText }}">
   {% endif -%}
   {%- if imgThumbUrls %}
   {% for imgThumbUrl in imgThumbUrls %}
   <meta property="og:image" content="{{ imgThumbUrl }}">
+  <meta property="twitter:image" content="{{ imgThumbUrl }}">
   {% endfor %}
   <meta name="twitter:card" content="summary_large_image">
   {%- elif postView.Author.Avatar %}
-  {# Don't use avatar image in cards; usually looks bad #}
   <meta name="twitter:card" content="summary">
+  <meta property="og:image" content="{{ postView.Author.Avatar }}">
+  <meta property="twitter:image" content="{{ postView.Author.Avatar }}">
   {% endif %}
   <meta name="twitter:label1" content="Posted At">
   <meta name="twitter:value1" content="{{ postView.IndexedAt }}">