Back Original

Introducing Mirror Darkly

Recently I built a little tool I call Mirror Darkly. It exports my blog posts from an Obsidian vault to the blog’s git repo.

The meat of the work is being done by the excellent obsidian-export crate and its dependencies. Mirror Darkly adds a few features on top:

  1. You can define a JSON config to map multiple paths within one vault to various locations on the filesystem (for example, I have my index page, static image folder, and posts folder all mapped).
  2. All files at the destination folder will be overwritten (preventing stale files from sticking around), except for specific allowlisted files. This lets me keep config files stored in my git repo but not Obsidian.
  3. Links are rewritten to be HTML-friendly.
  4. I organize my blog posts with the date in the file name, for easy skimming. This means that the link targets have the date in their name in Obsidian; Mirror Darkly strips it out when writing the files for my blog to consume.

I have a few more features planned (like dead link detection, for one) and I might release a version of my janky Obsidian extension that shells out to Mirror Darkly.

Mirror Darkly solves my idiosyncratic problems and may not address yours at all. That’s fine—take it as an ad to write tiny software just for yourself. Houseplant programming 🪴!