Bluesky Comments Extension
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.
As an example, let’s use the following Bluesky post. Feel free to join the conversation by commenting on the post - your comment will appear below when you refresh the page!
Installation
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.
Requirements
- Quarto version 1.5.0 or higher
- A web browser with JavaScript enabled
Usage
To embed comments from a Bluesky post, use the bluesky-comments
shortcode in your Quarto document:
{{< bluesky-comments uri="at://did.plc/rkey" >}}
Converting Bluesky URLs to AT Protocol URIs
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" >}}
Configuration
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
---
Available Options
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.
Styling
Modify the extension’s appearance by overriding CSS classes in:
_extensions/bluesky-comments/styles.css
Limitations
- Only works in HTML output formats with JavaScript enabled
- Subject to Bluesky’s API rate limits and availability
Acknowledgements
This extension builds upon the innovative work of: