I'm in the awkward position where it is good enough to use, but not good enough to publicize. But everything is "shared" here .
So my requirements were :
- Generating multiple documents (html)
- having code, HTML, and text snippets that can be :
- duplicated in the same document (for code snippets : once as hidden definitions to enable running snippets apparently "out-of-order" and then when I want to show them)
- shared between documents
- having all the text and code for a document in the same file (for convenience)
- using emacs org-mode with language specific editing goodies for my code snippets
This implies that I want to have the source for multiple documents in just one file. To achieve that, I'm
(ab-)using an hacked (butchered) version of ox-jekyll-subtree to just export a subtree of the org document to HTML. (I don't really use the jekyll template processing step). I should really just use something like this without the parts that add the jekyll specific data to the file.
For the snippets, I use a level of indirection so that the document tree has a
#+call: that will be replaced by the snippet at generation time.
My ugly way to have HTML or text snippets is just to return a string from an elisp source block.
Of course, to have clojure code wrapped as klipsified html, I add anothoer level of indirection :
I use real clojure source blocks (to have emacs editing goodies) with a
#+NAME: and an elisp function (also in a source block) take the name (or list of names) as parameter.
It then generates the klipsified HTML fragment.
It is ugly for now because I have many such elisp fragments for single soure block or a list of them, for reagent or regular stdout output or for a hidden execution.
I still have to figure out a way to "parametrize" languages for the snippets (computer languages e.g. python or clojurescript and natural languages e.g. english and french) as my goal would be to generate combinations of those in an automated way.
That's where I am now, thank you for your interest in this !