Enable Bluesky social discussions in your Quarto documents
Bluesky Comments is a Quarto shortcode extension that seamlessly integrates Bluesky post comments into your documents. This extension dynamically fetches and displays threaded conversations from Bluesky, creating an interactive bridge between your content and social discussions.
You can install this extension using Quarto's extension management system:
quarto add coatless-quarto/bluesky-comments
This will install the extension under the _extensions
directory of your Quarto project.
To embed comments from a Bluesky post, use the bluesky-comments
shortcode in your Quarto document:
{{{< bluesky-comments uri="at://did.plc/rkey" >}}}
To get the correct URI format, use the Bluesky/AT Protocol URL ↔ Identifier Converter.
For example:
Original URL:
https://bsky.app/profile/coatless.bsky.social/post/3lbtwdydxrk26
Converted AT-URI:
at://did:plc:fgeozid7uyx2lfz3yo7zvm3b/app.bsky.feed.post/3lbtwdydxrk26
Final shortcode:
{{< bluesky-comments uri="at://did:plc:fgeozid7uyx2lfz3yo7zvm3b/app.bsky.feed.post/3lbtwdydxrk26" >}}
The extension can be configured through your document's YAML frontmatter or the _quarto.yml
configuration file. Add configuration options under the bluesky-comments
key:
---
title: "My Document"
bluesky-comments:
mute-patterns:
- "📌"
- "🔥"
- "/\\bspam\\b/i" # regex pattern
mute-users:
- "did:plc:1234abcd"
filter-empty-replies: true
visible-comments: 3
visible-subcomments: 3
---
mute-patterns
: An array of strings or regex patterns (enclosed in /
) to filter out comments containing specific textmute-users
: An array of Bluesky DIDs to filter out comments from specific usersfilter-empty-replies
: Boolean flag to filter out empty or very short replies (default: true
)visible-comments
: Number of top-level comments to show initially (default: 3
)visible-subcomments
: Number of replies to show initially under each comment (default: 3
)Users can click "Show more" buttons to reveal additional comments and replies beyond these initial limits. Filtered comments are counted and displayed at the top of the comments section to maintain transparency about moderation.
Modify the extension's appearance by overriding CSS classes in:
_extensions/bluesky-comments/styles.css
This extension builds upon the innovative work of: