Open ShaddyDC opened 1 year ago
I'm interested in this as well. Just installed the OEE plugin hoping it would work, but even the HTML is lacking the necessary CSS.
Currently there is no energy to support Obsidian's unique markdown syntax. If you're interested in this, try pandoc's lua-filter. Finally done, welcome to provide your lua scripts and command templates to this plugin. that would benefit more users of this plugin.
I will take a look. I spent most of the afternoon trying to decipher Obsidian's CSS code for callouts, in order to recreate them in Hugo as a shortcode. I've advanced, but can't say I'm anywhere near a solution.
Here is the example snipets that produce ouput for Hugo: https://github.com/mokeyish/obsidian-enhancing-export/blob/144a8d7d4f0ce4beb4d9caaa3c549a780f6a2aab/lua/markdown.lua#L141-L151
Tip for those who stumble upon this issue: you can use this lua filter: https://gist.github.com/jskherman/8e721302e67d308e8a81f3df84f01f20
Obsidian has support for a Markdown Extension called Callouts.
They effectively allow you to have special sections in your files to for example give a useful tip:
Currently, without special treatment, they are exported verbatim. Unfortunately, afaict, Hugo does not support this syntax. Maybe there is an elegant way to implement it, but I have not seen it.
Instead, I would suggest converting it to a shortcode, similar to what is already being done with mathjax. Then a user can define it to work however they want. It would have as parameters the title and the kind of callout, maybe an extra flag about whether it's collapsible, and the rest as the content. I'm not sure if that would work for nested callouts, but I'm not sure how common those are anyway.
Any thoughts or alternative suggestions? Maybe there's a better way I overlooked.