Repository navigation
feat(syndicator-mastodon): add categories to status as hashtags - #875
Merged
paulrobertlloyd merged 1 commit intoAug 16, 2026
Merged
Conversation
Adds an includeCategories option which appends a post’s categories to the end of the status, where Mastodon displays them as links. Off by default, so existing syndicated posts are unchanged.
Contributor
|
Thank you, Ricardo! The fixes sound perfect. 🙏 |
Collaborator
|
We could possibly add the same mechanic to the Bluesky syndicator, though I’m not sure if tags are as much of a thing on that platform. Happy to accept a companion PR to add it to that plug-in too, if anyone wants it. |
paulrobertlloyd
pushed a commit
that referenced
this pull request
Aug 16, 2026
Companion to #875, which added the same option to the Mastodon syndicator. Appends a post's categories to the end of the post text when the includeCategories option is enabled. createRichText already runs detectFacets, which turns the resulting #hashtags into app.bsky.richtext.facet#tag entries, so no facets are built by hand. Off by default, so existing syndicated posts are unchanged.
paulrobertlloyd
pushed a commit
that referenced
this pull request
Aug 16, 2026
Companion to #875, which added the same option to the Mastodon syndicator. Appends a post's categories to the end of the post text when the includeCategories option is enabled. createRichText already runs detectFacets, which turns the resulting #hashtags into app.bsky.richtext.facet#tag entries, so no facets are built by hand. Off by default, so existing syndicated posts are unchanged.
Collaborator
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Closes #832.
Adds an
includeCategoriesoption to the Mastodon syndicator. When enabled, a post’s categories are appended to the end of the status, where Mastodon renders them as hashtag links:Placing them at the end matters for the reason given in the issue: hashtags only get Mastodon’s link styling when they aren’t buried mid-sentence, which is why the reporter’s manual workaround didn’t quite work.
Behaviour
Categories are normalised to something Mastodon will actually recognise as a hashtag:
_are removed, socheese sandwichesbecomes#cheesesandwichesandweb-designbecomes#webdesign(a hyphen would otherwise end the hashtag)holidays/family tripsbecomes#familytripsHashtags already written into the post content aren’t repeated, so anyone currently using the workaround in the issue won’t end up with them twice.
Where a character limit applies, the hashtags are counted towards it and the content is truncated to leave room, rather than the status overrunning.
Default
I’ve defaulted this to
false, followingincludePermalink, so nobody’s syndicated posts change unless they opt in. That said, the issue is phrased as an expectation rather than a feature request, so if you’d rather it default totruethat’s a one-line change — happy to switch it.Tests
Nine tests added to
test/unit/utils.jscovering the option on and off, normalisation, hierarchical categories, deduplication, not repeating hashtags already in content, and staying within the character limit. The existing tests are unchanged and still pass.Notes
This only covers
syndicator-mastodon. #832 is about Mastodon specifically, but the same thing presumably applies to other syndicators — I’ve not touched those here.