diff options
author | bnewbold <bnewbold@robocracy.org> | 2023-05-08 13:03:03 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-08 15:03:03 -0500 |
commit | 249d166811a718781f6bc694de5c9061714b0db4 (patch) | |
tree | 6a00339f04efeb892e260c87cfe5a422e06bda22 /bskyweb/templates/post.html | |
parent | 6d9e23b1be92f00304ca267b49a8339e9b505ee7 (diff) | |
download | voidsky-249d166811a718781f6bc694de5c9061714b0db4.tar.zst |
bskyweb: re-work HTML meta tags, for share cards (#596)
Diffstat (limited to 'bskyweb/templates/post.html')
-rw-r--r-- | bskyweb/templates/post.html | 45 |
1 files changed, 26 insertions, 19 deletions
diff --git a/bskyweb/templates/post.html b/bskyweb/templates/post.html index a24f64ab5..866a97396 100644 --- a/bskyweb/templates/post.html +++ b/bskyweb/templates/post.html @@ -1,25 +1,32 @@ {% extends "base.html" %} -{% block head_page_meta -%} -<!-- TODO: "same as" indication with at:// URI? --> -{%- if postView -%} - <meta property="og:type" content="article"/> - <meta name="twitter:card" content="summary"/> - {%- if postView.Author.DisplayName -%} - <meta property="og:title" content="{{ postView.Author.DisplayName }} / {{ postView.Author.Handle }}"/> - <meta name="twitter:title" content="{{ postView.Author.DisplayName }} / {{ postView.Author.Handle }}"/> - {%- else -%} - <meta property="og:title" content="{{ postView.Author.Handle }}"/> - <meta name="twitter:title" content="{{ postView.Author.Handle }}"/> - {%- endif -%} - {%- if postView.Record.Text -%} - <meta name="twitter:description" content="{{ postView.Record.Text }}"/> - <!-- TODO: could put any images in here, or author avatar --> - {%- endif -%} -{%- endif -%} +{# TODO: link rel=canonical #} +{# TODO: "same as" #} +{% block html_head_extra -%} +{%- if postView %} + <meta property="og:type" content="article"/> + <meta name="twitter:card" content="summary"/> + <meta property="og:title" content="{{ postView.Author.Handle }} - Bluesky"/> + <meta name="twitter:title" content="{{ postView.Author.Handle }} - Bluesky"/> + {%- if postView.Author.Avatar %} + <meta property="og:image" content="{{ postView.Author.Avatar }}"/> + <meta name="twitter:image" content="{{ postView.Author.Avatar }}"/> + {% endif -%} + {%- if postView.Record.Text %} + <meta property="og:description" content="{{ postView.Record.Text }}"/> + <meta name="twitter:description" content="{{ postView.Record.Text }}"/> + {% endif -%} + <meta name="twitter:label1" content="Author DID"> + <meta name="twitter:value1" content="{{ postView.Author.Did }}"> +{% endif -%} {%- endblock %} {% block noscript_extra -%} -<p>{{ postView.Author.DisplayName }} / {{ postView.Author.Handle }} -<p>{{ postView.Record.Text }} +<div id="bsky_post_summary"> + <h3>Post</h3> + <p id="bsky_display_name">{{ postView.Author.DisplayName }}</p> + <p id="bsky_handle">{{ postView.Author.Handle }}</p> + <p id="bsky_did">{{ postView.Author.Did }}</p> + <p id="bsky_post_text">{{ postView.Record.Text }}</p> +</div> {%- endblock %} |