I developed the new Grav plugin Social Linking because I felt the CMS used here was missing a certain feature. At the end of my posts, I like to link to a corresponding post in the Fediverse (I use Mastodon) to share it on the blog and discuss comments there. Until now, however, there was no way to include posts from the Fediverse in my blog articles beyond simply linking to them (or using screenshots). That has now changed fundamentally.
Interessiert am ehrlichen Austausch, kein autofollow. Ungeschminkt, manchmal schmerzhaft. 🇪🇺 🇺🇳
#notjustsad
💜
Social Linking can use simple shortcodes ([social-embed...]) to embed and display user profiles (see above), individual posts, or public timelines from an instance. When a page containing such a shortcode is first loaded, the plugin downloads the necessary information and media via the Mastodon API and stores it in a subdirectory of the page before rendering it from that subdirectory. This ensures that the version of the post relevant to the article is preserved, and the instance isn’t queried again every time the page loads—which would noticeably slow down loading times. Using the Mastodon API has the advantage of automatically supporting all Fediverse platforms that implement this API.
A detailed manual in the form of a wiki is available for users (administrators of a Grav CMS).
Since I wanted to offer the plugin via the GPM repository’s integrated method—to make it installable in the Admin Plugin and via bin/gpm install social-linking and since the company (Trilby Media) behind the open-source CMS requires a GitHub repository for its automatic distribution, I opted for a slightly more extensive setup for version control.
Social Linking is hosted on Codeberg and immediately mirrors incoming push operations to the GitHub mirror, which is monitored by Grav for new releases and then offers them as installations or updates within an hour. I don’t want to bore you with technical details about the implementation here. Anyone interested is welcome to reach out to me on the Fediverse.
If you’d like to contribute to the development of Feed Teasers, please check out the CONTRIBUTING.md file in the repository. You can also help with the translation of the configuration interface.
Feel free to discuss this post with me on the Fediverse.