+103
-26
README.md
+103
-26
README.md
···-Look at the [Nuxt documentation](https://nuxt.com/docs/getting-started/introduction) to learn more.-Check out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information.
···+Comments on this blog are directly integrated with Bluesky, the atproto-based micro-blogging social network.+This integration relies on the `@atcute/` library collection for interaction with Bluesky/atproto.+The idea was originally inspired from [natalie's blog](https://natalie.sh/posts/bluesky-comments/).+Although I ended up using mostly the same tools and strategies, I didn't follow her post to build it here.+They can then post about it on Bluesky, find the post id, and add it to the `bskyCid` field in the post frontmatter.+Any Bluesky post below the one identified will now be displayed at the bottom of the blog post, allowing for integrated conversation about the post.+All the data is decentralised and public ([for now](https://pfrazee.leaflet.pub/3lzhui2zbxk2b)).+This openness allows us to reuse and build things based on that data very easily, in a built-in way, without hacky workarounds.+Contains the utility functions for retrieving all replies to a post, and extracting a post id from an atproto uri.+Uses `@atcute/client` to fetch using the `app.bsky.feed.getPostThread` RPC on the Bluesky public API.+Everything is strongly typed, although fetch errors are handled as `post not found` to make handling simpler in the Vue component.+The author DID is set blog-wide in the config file through `authorDid`, as it is primarily intended as a personal blog.+If need be, I can always move the DID parameter to the post frontmatter, allowing for guest authors or secondary accounts too.+The component simply fetches the replies by calling `getBskyReplies`, passing in the post CID passed as prop,+This component displays the post author, their avatar, the post content, and its stats beautifully.+Replies to replies are indented accordingly to visually thread replies together, using `BskyPost` recursively,+The actual post page only had some minor adjustments to integrate the `BskyComments` component,+using a `Suspense` boundary with a fallback to avoid blocking the rendering of the actual content.+Some other files saw modifications, to adapt to this integration addition, allowing for visual consistency.+Using Bluesky as a comment platform allows me to integrate conversations about my posts directly alongside them,
+18
-12
app/components/BskyComments.vue
+18
-12
app/components/BskyComments.vue
···············<a class="underline" :href="`https://bsky.app/profile/${post.post.author.handle}/post/${cid}`">Reply on Bluesky</a> to take part in the discussion.···
···············<a class="underline" :href="`https://bsky.app/profile/${post.post.author.handle}/post/${cid}`">Reply on Bluesky</a> to take part in the discussion.···+v-for="reply in post.replies?.filter(reply => reply.$type === 'app.bsky.feed.defs#threadViewPost')"
+13
-1
app/util/atproto.ts
+13
-1
app/util/atproto.ts
············
············
+1
package.json
+1
package.json
+10
pnpm-lock.yaml
+10
pnpm-lock.yaml
······resolution: {integrity: sha512-SYxhrx1AFq2MBcXk77AERYz2mPhLQes1F0vtvG64+dJZWyge9studXo7MiR8PPeLjRjZdWRrReRbxiwdRMf70Q==}resolution: {integrity: sha512-tGXRmXtb8oFu8DNg9MsS1pywKFgs9QZ4U6LBzUamBHaw3ePSiPd7ouE64gzHzfEcR16hgVaXoUa+XxD3BB0XOg==}···
······resolution: {integrity: sha512-SYxhrx1AFq2MBcXk77AERYz2mPhLQes1F0vtvG64+dJZWyge9studXo7MiR8PPeLjRjZdWRrReRbxiwdRMf70Q==}+resolution: {integrity: sha512-hZVx6LMEkYckScdRdUuQWcmv8Lm2au6Cnf799TLoR6YgiAfFvaJ4M5ElwcnExvCu8ntsS7jW89r0W5LwBAfZXQ==}resolution: {integrity: sha512-tGXRmXtb8oFu8DNg9MsS1pywKFgs9QZ4U6LBzUamBHaw3ePSiPd7ouE64gzHzfEcR16hgVaXoUa+XxD3BB0XOg==}···