Prompted by a https://clojurians.slack.com/archives/C053AK3F9/p1754141186080849?thread_ts=1754131514.543399&cid=C053AK3F9 on #beginners, I wrote a little starting point for publishing Org-mode files on the web from a Babashka or JVM Clojure process: https://github.com/teodorlu/bb-org-example Note that this is less feature rich than Michiel's own https://github.com/borkdude/quickblog: No RSS, less pretty index, no tags support, no post previews — but it does let you write Org-mode. The heavy lifting of Org-mode to HTML conversion is done with Pandoc, which is a required dependency.
I've been thinking about a pandoc pod. that would at least cut the startup time of pandoc. how quick is it to convert one document using this code? https://github.com/teodorlu/bb-org-example/blame/master/src/bb_org_example/pandoc.clj#L121-L127
Without a pod: slower than I'd want. For short org-mode strings, process startup overhead dominates the total runtime (from previous benchmarks I've run). At the phone right now - I can give you some hard numbers when I'm back in front of a computer.
sure, no hurry
It appears the shellout tax is about 30 ms per call to pandoc.
I measured the conversion of all org-files on my site with the same code, and saw conversion times from 64 ms and up. The code shells out to Pandoc twice, first to convert from org-mode to Pandoc JSON, and then to convert back from Pandoc JSON to HTML. Full results: https://play.teod.eu/pandoc-shellout-tax/#results
can't you go straight to html?
I removed the pandoc indirection — now I just shell out once to pandoc. It wasn't helpful to the goal of briefly helping someone getting started with a small Org-mode powered site. Thanks for good questions!
You can! pandoc --from org --to html --standalone.
I've previously needed to do things on the intermediate JSON, eg infer post title, extract the first paragraph and read links, but in this code it's not strictly necessary.