Publ: Development Blog

Publ v0.6.4, now with attachments

Posted (3 months ago)

There are several important bugfixes in this as well as one major new feature. Changes since v0.6.3:

  • Rewrote the indexer scheduling logic both for better peformance and to (hopefully) stop clobbering entry text on content deployments
  • Added entry attachments, which allows associating entries directly with one another
  • Fixed a silly caching bug introduced in v0.6.3 which basically broke the cache

Entry attachments are a sort of generic solution to a few different specific problems I had. For example, I wanted to be able to do things like declaring relationships between entries (“see also” et al), but I also wanted to be able to have content blocks other than entry.more. The specific use case I had in mind was for things like comic transcripts.

One way I was thinking of doing this was by extending the ..... syntax to have a section type (i.e. .....transcript or whatever), but from both a code and API standpoint I was having a hard time wrapping my head around how this would work in a lot of edge cases, as well as how to make it more usable for external tooling. And then I realized that simply allowing associations between entries, and having the entry type itself dictate what sort of thing it is, would work a lot more generically.

Anyway, on my old site I was using Oh No Robot for crowdsourced comic transcripts, which worked well enough at the time. I had a bunch of hacks in place to export those transcripts to my templates, and adapting those hacks into generating Publ attachments was straightforward enough. So now you can see the transcripts underneath my comics, or at least the ones which have them. At some point I might write a separate Publ-specific tool to make it easier for people to crowdsource transcripts, too!

In any case, the sample templates have been updated to include this new functionality.