Issue #117 identifies bare Mastodon post URLs in blog posts that should render as Mastodon embeds.
Example shape:
https://mastodon.social/@JuliusGoat/109551955251655267
These currently render as plain links or bare URLs instead of richer embeds.
Only convert standalone bare Mastodon post URLs.
Convert markdown links to Mastodon posts when they appear alone on their own line.
Detect Mastodon URLs during rendering and replace them with embed markup in the layout.
Pros:
Cons:
Rewrite matched posts to explicit Mastodon embed markup in source files.
Pros:
Cons:
Normalize content and add validator coverage for the risky input pattern.
Pros:
Cons:
Use approach 3.
Phase 1 should normalize only lines that are:
into canonical Mastodon embed markup that includes:
mastodon-embed blockquote markupThe wrapper should be repo-owned so future styling can target Mastodon embeds as a group.
Phase 1 should produce a wrapper similar to:
<div class="gp-mastodon-embed">
<blockquote class="mastodon-embed" data-embed-url=".../embed">
...
</blockquote>
<script data-allowed-prefixes="https://mastodon.social/" async src="https://mastodon.social/embed.js"></script>
</div>
For this pass, it is acceptable to keep the provider-specific inline styles from the issue example if that is the stable embed shape.
Phase 1 should match only lines where the whole non-whitespace line is a Mastodon post URL such as:
https://mastodon.social/@user/123456789012345678
Do not match:
Add validator coverage that flags standalone bare Mastodon post URLs in posts that fall under the enforcement window for this feature.
The validator should not flag:
_posts/.