Petter Hassberg proposed a simple and interesting plugin architecture for Plerd posts in November. It currently exists as a pull request biding its time in Plerd’s GitHub repository, with some attached discussion.
With these changes applied, Plerd no longer limits its processing to Markdown files; instead, it looks up every source file against an internally defined table that pairs file-types with file-processing code. This table’s default state would have only one entry, instructing Plerd to treat Markdown files exactly as it already does. Third-party plugin modules loaded by Plerd would have access to this table, however, and thus folks could extend Plerd’s ability to publish different posts depending upon the flavor of its input files.
Petter himself has been using this to run his own Plerd-based blog as a photo album: he drags JPEG files into his source directory, and Plerd immediately turns each one into a complete blog post, using the JPEG files’ metadata as needed to add title and other information to the posts’ textual content. Since the plugin has full control of Plerd’s faculties while processing its posts, it can do more that creating HTML files for every post; in this case, it also copies the JPEGs into the docroot, and runs filters on them. I think that’s pretty cool!
All that said, I feel hesitant to architecture this feature into core. It’s not something that I myself have use for right away, and technically one could reproduce this behavior with Plerd as-is, perhaps writing a little script that moves the JPEG into the docroot, creates a Markdown file linking to it, and then feeding that to Plerd. But I can see the appeal and fun of watching Plerd itself do all the work, too!
I would be very interested to hear other potential applications of this idea. Would this inspire you to create interesting blog-growing plugins for certain file types? Ought it inspire me in ways that I haven’t imagined, yes? Drop me a note, or comment on that GitHub thread.
Over on Fogknife, I have begun experimenting with a new experimental Plerd branch that implements tags. It’s pretty simple: the published docroot contains a directory called “tags”, containing one page for every unique tag mentioned in posts’ metadata, and each such page links back to all the posts invoking that tag. There’s a master tag list, too.
When I first launched Plerd in 2014, I declared its lack of tags or categories as a feature — but, four years and 250 Fogknife posts later, I found myself desiring a little bit of basic post-categorization after all. So when my old pal Joe Johnston submitted a pull request last August that added tags to Plerd, I welcomed it. I was knee-deep in the “CPAN” branch by then, though, so I put it off, and Joe has since requested that I make any final changes myself. So, that’s what I’m doing now.
I intend to twiddle with how tags work until satisfied with it, and then turn it into a pull request of my own. Your thoughts on it are quite welcome in the meantime, and the
tags branch exists on Plerd’s GitHub repository as well.
As foretold by the previous post on this blog, Plerd is now available on CPAN. Starting now, you should (in theory) be able to install the latest Plerd release on your machine by running a command like
cpan Plerd, and from there making a new Plerd-based blog appear with
Thanks to all who tested and provided feedback on Plerd’s experimental GitHub branch last month for helping to make this possible. I expect that plenty of rough bits still remain to file down with this release, and I will attend to these as I find them — or as they are pointed out to me.
The software’s presence on MetaCPAN does not particularly impress, at the moment. In particular, where one would expect to find full documentation for using Plerd, one instead gets a sheepish hyperlink to Plerd’s README file on GitHub, followed by a not immediately useful guide to Plerd’s software internals — and even that isn’t very well formatted! But, I knew I had to start somewhere, so I decided to just ship the darn thing and start improving all that stuff in-place. I know better than to discount the motivational power of a project looking a bit awful in broad daylight, after all.
Documentation, in particular, sits at the top of my list of Plerd sub-projects to tackle next. While I will always strive to keep the project’s simplest use-case actually simple, Plerd’s complete user manual has nonetheless long since outgrown that single README file. Plerd has come a long way in the nearly four years since its initial launch; this version, intended for the first time to run outside of a manually Git-cloned directory, feels like a first awkward lurch out of childhood. I look forward to a confusing and exciting adolescence for this project.
cpan branch of Plerd’s GitHub repository holds the proposed version 1.7 source for Plerd. It’s more of an organizational change than a feature-based one, and as it’s driven in part by suggestions that I’ve received from other Plerd users, I would very much appreciate some comment about it.
The main difference it has from 1.6 involves dist-friendliness: it allows you to install Plerd at either a user- or system-wide level and invoke its programs from anywhere on your system. This will allow for me to package and distribute it in the style of other Unix software, without forcing the you-the-user to fuss over dependencies. (I plan to begin by getting Plerd onto CPAN.)
This version also tries to make launching new blogs with Plerd less of a prickly procedure, providing a new
plerdall --init command that pops a blank blog directory into being, already populated with a config file and templates.
At this time, installing this branch involves following these steps:
Download the branch from GitHub, and unpack it (or clone the repository and then switch to its
While in the code’s directory, run
cpanm --installdeps . just to make sure you have all of Plerd’s dependencies installed. (If you wish to install Plerd system-wide, instead run
sudo cpanm --installdeps ..)
perl Makefile.PL; make; make install. (If you wish to install Plerd system-wide, make that last bit
sudo make install instead.)
That should be it; you should now be able to navigate elsewhere on your system, run
plerdall --init, and marvel to the appropriate degree as a
plerd/ directory appears, full of goodies.
The idea, of course, is that once this is in CPAN or some other package manager, the one-step installation will involve something like typing
cpanm Plerd and that’ll be that. But before I get there, I want to give other Plerd-using folks some time to chime in. Please consider this comment period open through Monday, October 15; you can post commentary either directly to me or to one of the mailing lists.
Hello. This post introduces a new website about Plerd, located for the present at http://plerd.jmac.org. I intend, here, to post news and updates of interest to the tiny but extant Plerd-using community. It also serves as a nice place to collect and prominently display useful Plerdish hyperlinks, such as the link to Plerd’s GitHub-hosted documentation up in the top navigation bar.
Heretofore I have shared Plerd news from time to time on my general-interest blog. However, I have held back from posting every update about the software as often as I might like, since more detailed or frequent news about Plerd would not really fit Fogknife’s tone. Inversely, I’ve felt self-conscious about folks seeking Plerd news to have to wade through all my writing about cats and politics first. As such, I hope that this separation of interests will encourage me to keep Plerd’s users more informed.
Admittedly, this also counts as a dogfooding experiment, since the next version of Plerd currently under development more easily allows multiple blogs to co-exist on a single server. And with this post, we see this new feature officially at work. Things, I dare say, look okay for now.