mirror of https://git.lenooby09.tech/LeNooby09/social-app.git

feat: post.html structured content, wip

Changed files
+35
bskyweb
templates
+35
bskyweb/templates/post.html
··· 56 56 <meta property="article:published_time" content="{{ postView.IndexedAt }}"> 57 57 <link rel="alternate" type="application/json+oembed" href="https://embed.bsky.app/oembed?format=json&url={{ postView.Uri | urlencode }}" /> 58 58 <link rel="alternate" href="{{ postView.Uri }}" /> 59 + <script type="application/ld+json"> 60 + { 61 + "@context": "https://schema.org", 62 + "@type": "DiscussionForumPosting", 63 + "author": { 64 + "@type": "Person", 65 + "name": "{{ postView.Author.DisplayName|escapejs }}", 66 + "url": "https://bsky.app/@{{ postView.Author.Handle|escapejs }}" 67 + }, 68 + {%- if postText %} 69 + "text": "{{ postText|escapejs }}", 70 + {% endif %} 71 + {%- if imageThumbUrls %} 72 + "image": "{{ imageThumbUrls[0]|escapejs }}", 73 + {% endif %} 74 + "datePublished": "{{ postView.IndexedAt|escapejs }}", 75 + "interactionStatistic": [ 76 + { 77 + "@type": "InteractionCounter", 78 + "interactionType": "https://schema.org/LikeAction", 79 + "userInteractionCount": {{ postView.LikeCount }} 80 + }, 81 + { 82 + "@type": "InteractionCounter", 83 + "interactionType": "https://schema.org/CommentAction", 84 + "userInteractionCount": {{ postView.ReplyCount }} 85 + }, 86 + { 87 + "@type": "InteractionCounter", 88 + "interactionType": "https://schema.org/ShareAction", 89 + "userInteractionCount": {{ postView.RepostCount + postView.QuoteCount }} 90 + } 91 + ] 92 + } 93 + </script> 59 94 {%- elif requiresAuth and profileHandle -%} 60 95 <meta property="og:type" content="article"> 61 96 <meta property="profile:username" content="{{ profileHandle }}">