Adding Indieweb features to a PureBlog Site
In my previous article I indicated that I would follow up shortly with an article on posting to webmention, bluesky and mastodon directly, without requiring a third party service.
I came to realise though that my content structure is so bespoke, that it did not make sense to unwind my own build. Instead what I needed to show was how to implement this on a vanilla PureBlog install, respecting as much of the PureBlog core as possible.
I've spent the last few days simplifying what I've built on my site into just 6 files, and 3 sets of scripts ready to implement within the admin module. Once implemented, and customised to the site's webmention.io endpoints, social links, and bluesky/mastodon developer tokens, the site will have the following features:
- Implements Microformats2 on posts and blog page.
- Implements author h-card in post meta and footer - powered by existing PureBlog settings fields.
- Implements first image in post as opengraph image, and first paragraph as opengraph description where the post description field is left empty.
- Shares posts to Bluesky, Mastodon and via webmention directly, including the first 4 x image files attached to the post.
- Receives webmentions, and fediverse interactions as webmentions through Brid.gy, via webmention.io, and displays those interactions on the post to which they link in an opinionated style.
- Displays syndication links of shared posts.
- Converts YT video embeds to automatically use the nocookie variant.
- Includes Kev's PureBlog code to lightly obfuscate the site email address on a reply by email button.
Much of the above is not my own work, the Mastodon direct post and email obfuscation heavily utilise projects identified on pureblog.org. I have also used AI to simplify my own build into this project quickly - if you avoid all things AI, this project is not your bag.
You can find indieBlog at my subdomain indieblog.prry.uk, and the source at Codeberg.
AboutAbout Pure Blog, a simple flat-file blogging platform with a Markdown-first editor.IndieBlog · indieblog.prry.uk
indieBlogIndieweb bells and whistles for PureBlogcodeberg.org
Hope this helps, lemme know what you think. Now I'm going to get back to writing stuff, though taking inspiration from this project I would like to simplify some of my own build.
