Skip to content

Show comments from Mastodon and Bluesky - #27

Open
dannycolin wants to merge 1 commit into
bugzilla:mainfrom
dannycolin:add-social-comments
Open

Show comments from Mastodon and Bluesky#27
dannycolin wants to merge 1 commit into
bugzilla:mainfrom
dannycolin:add-social-comments

Conversation

@dannycolin

@dannycolin dannycolin commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

This uses oom-components/mastodon-comments to display replies from mastodon and bluesky.

To link a blog entry with our social media accounts, you need to add the following in the blog frontmatter:

comments:
  enabled: [ true | false ]
  mastodon: [url to post]
  bluesky: [url to post]

To test this patch, you can use the post urls from mastodon-comments' demo:

mastodon: "https://mastodon.gal/@misteroom/110810445656343599"
bluesky: "https://bsky.app/profile/lume.land/post/3lc3b4k2n6p2x"

@justdave

Copy link
Copy Markdown
Member

Is there a way to tell it we intend for there to be comments when the links aren't ready yet, so we can put something like "comment link coming soon, reload in a few minutes" or something like that?

I was thinking to add a comments section without any links listed under it yet, but I suppose that might break the yaml parser.

@dannycolin

Copy link
Copy Markdown
Contributor Author

I'm sure it's possible to detect if there's "no comments" vs. "not linked to mastodon/bluesky yet". However, I don't no if it's worth the trouble.

I'm guessing that if people see "no comments", they will come back later or click on the Mastodon or Bluesky link, and follow the post there directly.

Let me think a little about it and see if I can come with something tomorrow ;).

@justdave

Copy link
Copy Markdown
Member

There's not going to be a "No comments" message if the links aren't there yet, because the component isn't invoked without the links. There will be a "Comments" H2 block with nothing under it though, because that's in the template regardless.

If

{% if page.comments %}

actually works, then we should probably put that header inside that.

@dannycolin

Copy link
Copy Markdown
Contributor Author

There's not going to be a "No comments" message if the links aren't there yet, because the component isn't invoked without the links. There will be a "Comments" H2 block with nothing under it though, because that's in the template regardless.

Good catch. We can also add a {% else %} block. Only looking for page.comments wouldn't be enough to know if the links exist

@justdave

Copy link
Copy Markdown
Member

But if page.comments exists and there aren't links, we can display a message to check back in a few minutes for the comment links.

@dannycolin

Copy link
Copy Markdown
Contributor Author

IIUC, the steps would be:

  1. Publish a blog post with only comments: in the frontmatter
  2. Post on Mastodon and Bluesky
  3. Update the blog post with the social media links

Signed-off-by: Danny Colin <contact@dannycolin.com>
@dannycolin
dannycolin force-pushed the add-social-comments branch from 790bc17 to ad92b1f Compare August 14, 2026 20:41
@dannycolin

Copy link
Copy Markdown
Contributor Author

@justdave I added a new attribute enabled that you can set to true to show the comment section or not. If you set enabled without adding a mastodon or bluesky attribute, it shows a message that the links haven't been configured yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants