I recently built a WordPress plugin specifically for my friend Allison Sheridan over at Podfeet Podcasts. She had a huge mind map she wanted to display on her blog — HTML embeds were messy and broke the site, PNG exports were unsearchable and impossible to navigate, and she didn’t want to just offer an OPML download. So she output an SVG, and I built a viewer to embed it in a WordPress post with nice zooming and panning, text searchability, and a bunch of customization options.
I’ve submitted that plugin to the WordPress registry, but it will take a couple of weeks before it’s available. In the meantime, if you want to check it out, you can learn more at the BT SVG Viewer GitHub repo, or just download the latest zip file and use Upload Plugin to install it. It has complete built-in help you can access from the Preset Editor page. But I’ll post more about that when it’s available for easy install.
In the meantime, I thought I’d port it to Jekyll. I don’t have an immediate need for it, but being able to display mind maps such as those exported from MindNode Next seems like something I’ll definitely want to do sooner or later.
I packaged the Jekyll plugin as a gem, so you can install it just by adding it to the Gemfile and your _config.yml. Once that’s done, when you build the site, you’ll get a /svg-viewer/preset-builder/ that gives you an interface for building the Liquid tag used to embed the actual viewer.
Copying the generated Liquid tag and pasting it into a post serves up your SVG like:
You can define a whole set of default options for the tag in your _config.yml file.
I don’t know how many people will need this one, but I think it came out really polished and will be a perfect solution for those who do need it. Check out the project page for more details.