Jekyll is a popular static site generator that I’m using to develop the new Decipher SciFi site. It’s pretty sweet.
Normally, Jekyll’s include tag can only search for files in the site’s single configured includes directory (and that of the theme plugin, if it using one). That means that if a plugin wants to provide you with a template/fragment via includes, the best it can do is ask you to copy it into your own repo manually. That sucks.
So I wrote jekyll-plugin-include: a gem-based Jekyll liquid tag plugin which allows includes directly from plugins’ _include directories, with optional ability to override with files present in site includes_dir (if they exist).
This plugin then makes it easy to use includes that ship with a plugin directly from a plugin. And if a modified version of the file is provided in the site’s own includes directory, it can intelligently use that one instead!
And for plugin developers, this provides a way to ship and use includes without leaning on the user to manage the unmodified files themselves.
As part of our podcast website migration from WordPress to Jekyll, I’m coding in a bunch of functionality that I’ve wanted for a while. The first one: a cli utility to fetch movie metadata into (semi-)structured data.
"overview":"In the post-apocalyptic future, reigning tyrannical supercomputers teleport a cyborg assassin known as the \"Terminator\" back to 1984 to kill Sarah Connor, whose unborn son is destined to lead insurgents against 21st century mechanical hegemony. Meanwhile, the human-resistance movement dispatches a lone warrior to safeguard Sarah. Can he stop the virtually indestructible killing machine?",
Check the help output for full and up-to-date functionality details, including a flag for interactive mode for when you’re less than confident that you’ll get the right answer. 🤓