Jekyll-plugin-include. Jekyll vial logo CC-BY Jekyll https://github.com/jekyll/brand/

Jekyll – use includes directly from plugins

Jekyll is a popular static site generator that I’m using to develop the new Decipher SciFi site. It’s pretty sweet.

But!

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).

https://github.com/decipher-media/jekyll-plugin-include

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.

ლ(╹◡╹ლ)

Bash rclone autocomplete logo

Rclone remote path auto-completion on Linux (Google Drive)

I started playing with rclone in the interest of easily editing files from Google Drive with Vim. As it turns out, you can’t edit native Google Docs files in this manner, so that was a wash!

But a side benefit of this misadventure is this bash autocomplete script which I wrote to auto-complete remote paths for rclone with a Google Drive target. It probably works for others too, I haven’t tested them. 🙂

This implementation is in pure bash all except for the call to rclone itself to check against known remote targets. I appreciated An introduction to bash completion to get me started on the concepts, and the rest of what anyone needs is all in the bash manpage under complete.

Here in this post is the initial version I’m using. If you’re going to use it, check the current version of the file on my Github in case anything changes.