Today I'm making the first public release of Platypub, an open-source blogging + newsletter tool which I started developing on the side a few months ago. I've used Platypub to write this very announcement, along with the rest of the website. I've also built another site with it.
My first motivation for building Platypub is because I wanted to have an open-source project that would help people learn Biff, the Clojure web framework I made (Platypub is built with Biff). Since lots of programmers have blogs, I figured it might give people a nice opportunity to submit PRs to a real, working project they use themselves. At a minimum, it'll provide some source code to read.
My second motivation—and the reason I picked this particular application to build—is that I'm scratching my own itch. I publish blog articles and newsletters in several different places using several different tools, and it was becoming unwieldy. I wanted a single publishing tool that would handle all my needs in one place. Something both convenient enough for non-technical users and yet with a theme system that provides the same level of flexibility you would have if you coded the site from scratch.
That being said, Platypub is still very rough around the edges. It is not yet ready for non-technical users. I'm only releasing it now because it is ready for other people to hack on it. Indeed, I've intentionally restrained myself from putting too much work into it beyond the core functionality so that there's more low-hanging fruit for others to implement.
If you'd like to give it a spin, see the README. I've made several issues as well. If you're interested in hacking on a Biff project, feel free to take on one of those—or better yet, try using Platypub for a bit and then see what missing pieces you'd like to add. I'm happy to help you get started and provide code review. With this release out of the way, I'm also planning to start doing streamed pair programming sessions. At least two people have expressed interest already, so those might start soon. You can join #biff
on Clojurians Slack and/or the Biff newsletter for announcements.
Platypub includes a CMS and a theme system for rendering your websites and emails. For actually hosting the sites and sending the emails, Platypub integrates with Netlify and Mailgun. As such, you don't need to deploy Platypub to use it; you can just run it locally. You will need to get your own API keys for Netlify, Mailgun, and a couple other services.
Eventually I'd like to host an instance of Platypub so anyone can use it without needing to set it up. It's designed so that a single instance can service multiple users, so offering a free plan will be feasible.
TinyMCE is used for editing posts (no markdown, sorry! I prefer WYSIWYG. Also no block-based editing, thank goodness). If you add some S3 credentials to the config file, the editor will handle image uploads.
When you've finished writing a post, you can preview and publish it from the Sites page.
You'll need to create at least one site first, which involves setting some configuration options. Some of these options are required for all sites, while some of them are additional options specified by the theme you select:
A theme is basically a script that reads in your posts and site configuration from an input.edn
file and then spits out a set of static files. (The default theme is a Babashka script.) When you publish your site, those files are deployed to Netlify. If your site needs any backend functionality, the theme can output some serverless function code, which will also be hosted by Netlify. The default theme contains one serverless function, which powers the newsletter signup form:
(The site shown above uses the default theme, while the Biff website uses a custom theme.)
This theme setup gives you a lot of flexibility, but it also means that before Platypub can be provided as a managed service, we need to come up with a way to run the theme code in a sandbox.
Themes work similarly for the newsletter side of things: the theme script reads in a specific post and then returns some HTML, which is sent out to your mailing list via Mailgun.
We use Mailgun's mailing lists api for managing subscribers' email addresses. That also means we can let Mailgun handle unsubscribe requests (though we should probably add another serverless function for that eventually, since Mailgun's unsubscribe page is ugly).
At the moment, if you want to actually see your list of subscribers, you'll need to do it from the Mailgun dashboard. Similarly, you can set up a custom domain for your sites by going to Netlify.
Last week I wrote about a grand scheme I have, which includes promoting a media ecosystem that consists of many separate, interchangeable services instead of a few giant social media monoliths. Platypub is part of that: it's a "publishing service," meant to complement other services for consumption, discussion, and aggregation (read the post for more explanation). Within that framing, I think there are lots of interesting things to be experimented with. I see Platypub as a vector for trying out these experiments.
Published by Jacob O'Bryant on 20 Jun 2022