janboddez / share-on-mastodon

Easily share WordPress posts on Mastodon.
https://jan.boddez.net/wordpress/share-on-mastodon
GNU General Public License v3.0
39 stars 5 forks source link

Block (or similar) to display syndication links on the front end #33

Closed janboddez closed 1 year ago

janboddez commented 1 year ago

A block that can be added (inside of a row block, perhaps) to an entry meta area. Or a shortcode or other function that can optionally be appended to the post content.

janboddez commented 1 year ago

Note that it is already possible to hook into Syndication Links (although I don't think it's got block support). https://github.com/janboddez/import-from-mastodon/issues/18#issuecomment-1313951228

janboddez commented 1 year ago

In essence, this block is now part of (or rather, will be part of the next release of) IndieBlocks. https://github.com/janboddez/indieblocks/tree/main/blocks/syndication-links

While it may not be ideal to have to install a separate plugin, (1) this makes sense, because multiple plugins can hook into the "synd. links" blocks, and (2) the additional load by IndieBlocks should be super small, especially if only the "Enable blocks" setting is enabled.

Alternatively, one could use the Syndication Links plugin and enable Share on Mastodon's integration in order to have Mastodon URLs added to Syndication Links' list of URLs automatically. Syndication Links (the plugin) does not add blocks, but will instead add the links to the end of a post's content.

Especially when you're already using a block theme (i.e., the new Site Editor), however, it may be nice to have a "proper" block instead (and use IndieBlocks).