Creating shortcuts for Mac symbols in HTML

I use a fairly complex build system for the Marked 2 help documents that get used on both the website and in the internal help. Among the many features I’ve added over time is the ability to use named shortcuts for Mac symbols — Command, Shift, the Apple Menu, etc. — and have them replaced with HTML entities at compile time. Since it took a bit to put together the whole list, I thought I’d share it for anyone who faces a similar task.


This is a companion discussion topic for the original entry at https://brettterpstra.com/2019/04/19/creating-shortcuts-for-mac-symbols-in-html