Recently, I made the complete shift over to Bluesky. One thing that I found super nice about the platform (and ATProto in general), is the ability to easily query the API. This makes building on top of the protocol simple. I ran across a project for a simple static, comment embed system called simple-bluesky-comment-embed-wp
which does all the comment handling on the client. I adapted this for use with my Zine site, and it works great, speaking of you can use it now! This works by adding a conditional script tag that is added if I add a custom parameter to the frontmatter.
.title = "Bluesky Comments for Zine",
.description = "Building adapting comments for my Zine site",
.date = @date("2024-11-10"),
.author = "Ethan Holz",
.layout = "post.shtml",
.custom = {
"post-link": "https://bsky.app/profile/ethanholz.com/post/<some-post-id>"
}
I then use a use hidden <input>
tag to store the post URL, and then use a script to fetch the comments and display them on the page. If you don’t see comments enabled on the page, it means I did not post the post to Bluesky, or the site has not yet been rebuilt on my hosting provider.