feat: post.html structured content, wip
This commit is contained in:
@@ -56,6 +56,41 @@
|
|||||||
<meta property="article:published_time" content="{{ postView.IndexedAt }}">
|
<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" type="application/json+oembed" href="https://embed.bsky.app/oembed?format=json&url={{ postView.Uri | urlencode }}" />
|
||||||
<link rel="alternate" href="{{ postView.Uri }}" />
|
<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 -%}
|
{%- elif requiresAuth and profileHandle -%}
|
||||||
<meta property="og:type" content="article">
|
<meta property="og:type" content="article">
|
||||||
<meta property="profile:username" content="{{ profileHandle }}">
|
<meta property="profile:username" content="{{ profileHandle }}">
|
||||||
|
|||||||
Reference in New Issue
Block a user