How to use Bluesky posts as Ghost comments

Today I ran into a couple of interesting posts that focused on the benefits of bluesky as an open platform. One of the use cases shared focused on using bluesky for blog comments[1]. This shows the potential for using bluesky comments as a way to engage with readers that doesn't require the reader to sign up for an account to use the native comments[2] integration or resorting to disqus[3].

🖖
If you like the way I explain stuff, follow me on bluesky @nishtahir.com.

So I came up with a way to use them as comments on a Ghost blog by wrapping the comments in a web component. The code is available on Github for details on how it works. You can include the code in your site through code injection by including the content of dist/bluesky-thread.js in a script tag.

<script>
(function (global, factory) {
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
  typeof define === 'function' && define.amd ? define(factory) :
  ...
</script>

This adds a <bluesky-feed> element to your page. Which you can include by adding html to your post which should include the post you wish to include.

<bluesky-feed post-url="..."> </bluesky-feed>

This should render comments on your post. Like the comment thread below. You probably want to disable native comments if you have them enabled. There's no feature to disable this for one off posts[4], so the work around is to hide them by injecting a css script.

<style>
#ghost-comments-root {
    display: none;
}
</style>

  1. Liu, E. (2024) Using Bluesky posts as blog comments. emilyliu.me. Available at: https://emilyliu.me/blog/comments (Accessed: 2025-1-21). ↩︎

  2. (2022) Comments for Ghost. ghost.org. Available at: https://ghost.org/changelog/native-comments/ (Accessed: 2025-1-21). ↩︎

  3. Alli, E. (2021) 3 ways to integrate Disqus comments with Ghost. layeredcraft.com. Available at: https://layeredcraft.com/blog/3-ways-to-integrate-disqus-comments-with-ghost/ (Accessed: 2025-1-21). ↩︎

  4. (2023) Feature request to turn off comments on a single post. forum.ghost.org. Available at: https://forum.ghost.org/t/feature-request-to-turn-off-comments-on-a-single-post/40374 (Accessed: 2025-1-21). ↩︎


Comments

Reply on Bluesky to join the conversation.

Subscribe to Another Dev's Two Cents

Don’t miss out on the latest issues. Sign up now to get access to the library of members-only issues.
jamie@example.com
Subscribe