Just for fun, I’ve been porting some of my Jekyll plugins to
WordPress, and two of them have turned into what I think are
really useful plugins.
I’m not switching from Jekyll to WordPress, I’ve just been
enjoying the challenge of recreating these tools as
WordPress extensions. It’s somewhat funny because the Jekyll
plugins were originally created from WordPress plugins I’d
built, and they developed over time. So this is kind of a
round trip.
A plugin for managing downloadables and dropping download
cards into posts. You get a custom post type for each
download (file URL, version, description, info link, icon,
changelog), upload buttons for the file and icon right on
the edit screen, and an editable HTML card template with
Mustache-style conditionals
({{#description}}...{{/description}}) plus custom CSS with
a live preview.
Insert them via a TinyMCE button in the classic editor or a
Download block in the block editor. Pick from a dropdown
and the shortcode (or block) is inserted for you. On the
frontend you get a styled card: title, download link,
description, dates, and optional donate/info links. There’s
also a WP-CLI command to import from CSV (the way I handle
downloads in Jekyll):
wp btdl import_downloads --file=/path/to/downloads.csv .
Full details, more screenshots, and the shortcode reference
are on the BT Downloads project page.
This one is for writing keyboard shortcuts in posts without
hand-coding symbols. I’ve created a few variations of this
over time: for this blog, for Marked and Bunch
documentation, and probably others. A shortcode [kbd]
renders things like ⌥+⇧+⌘+A in the order Apple
recommends, with options for symbol vs text (e.g.
“Command-Shift-P”), a + separator, and Mac vs Windows
naming.
In the block or classic editor, use the formatting menu and
choose ⌘ Insert keyboard shortcut to open a dialog:
check modifiers (Cmd/Opt/Shift/Ctrl/Fn), type the key, and
insert the shortcode. Under Settings → Keyboard
Shortcuts you can tweak display (symbols vs text, +
separator, key symbols) and add custom CSS for the .btkbd
keycaps, with a live preview. Examples: [kbd cmd shift p]
→ ⇧+⌘+P, [kbd$@P] → ⇧+⌘+P. More
syntax and options are on the
BT Keyboard Shortcuts project page.
Repo and requirements
Both require WordPress 5.8+ and PHP 7.4+, and are GPLv2 or
later. The source for these and any future WordPress plugins
from me is my wordpress-plugins repo on GitHub. Grab
the code there or follow the install steps on each project
page.