Obsidian Support for League CommonMark
One of those other things is keeping notes for a Werewolf: The Forsaken 2E game that I play in every couple of weeks. We reached a point in the game where I became the designated note-taker for the group. However, none of the others use Obsidian, which it made it a bit difficult to share my notes with them in a user-friendly form.
Initially, I wrote a quick-and-dirty script that transformed the Markdown source file contents prior to using
league/commonmark to convert them to HTML. However, that solution was fairly hacky and its output wasn't very good in some cases.
A quick skim of Packagist results for a better solution didn't yield anything specific to my use case, so I took it upon myself to write my own extension for
elazar/league-commonmark-obsidian. (In the process, I even managed to submit a small fix to related
league/commonmark documentation that was merged!)
In addition to the extension itself, the library includes a simple stock conversion script
./bin/obsidian-to-html and a
Converter class used by that script that can be used in custom conversion scripts for additional customization of the output.
While I suspect that this package has a rather niche audience, I hope it proves useful to someone else. I've already replaced my own script with one that uses this extension and I'm fairly happy with the results.