feat: post.html structured content, wip

This commit is contained in:
Elijah Seed-Arita
2025-08-27 21:27:13 -07:00
parent 655964ec0b
commit caa7736035
+35
View File
@@ -56,6 +56,41 @@
<meta property="article:published_time" content="{{ postView.IndexedAt }}">
<link rel="alternate" type="application/json+oembed" href="https://embed.bsky.app/oembed?format=json&url={{ postView.Uri | urlencode }}" />
<link rel="alternate" href="{{ postView.Uri }}" />
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "DiscussionForumPosting",
"author": {
"@type": "Person",
"name": "{{ postView.Author.DisplayName|escapejs }}",
"url": "https://bsky.app/@{{ postView.Author.Handle|escapejs }}"
},
{%- if postText %}
"text": "{{ postText|escapejs }}",
{% endif %}
{%- if imageThumbUrls %}
"image": "{{ imageThumbUrls[0]|escapejs }}",
{% endif %}
"datePublished": "{{ postView.IndexedAt|escapejs }}",
"interactionStatistic": [
{
"@type": "InteractionCounter",
"interactionType": "https://schema.org/LikeAction",
"userInteractionCount": {{ postView.LikeCount }}
},
{
"@type": "InteractionCounter",
"interactionType": "https://schema.org/CommentAction",
"userInteractionCount": {{ postView.ReplyCount }}
},
{
"@type": "InteractionCounter",
"interactionType": "https://schema.org/ShareAction",
"userInteractionCount": {{ postView.RepostCount + postView.QuoteCount }}
}
]
}
</script>
{%- elif requiresAuth and profileHandle -%}
<meta property="og:type" content="article">
<meta property="profile:username" content="{{ profileHandle }}">