I'm used to working with Sphinx for projects in C ++ and Python. I just started a project in Clojure and I would like to reuse my Sphinx / reStructuredText skills to document my Clojure code. Since there is no domain for Clojure, I started writing it.
Oddly enough, Sphinx documentation is not needed at all for writing extensions. So, starting with the built-in modes for Python and Javascript, I have some basic elements. I can write a document for functions using the following directives:
.. clj:ns:: clojure.core .. clj:fn:: (filter f coll) :param f: predicate :param coll: collection Built-in!
However, the HTML output creates C / Python style signatures. The previous example creates the following:
filter(f, coll) Parameters: * f - predicate * coll - collection Built-in!
I would rather get a signature in the form of lisp -ish as:
(filter f coll) Parameters: * f - predicate * coll - collection Built-in!
The code that generates the signatures seems to reach the docutils.addnodes
module. How to get Sphinx to generate HTML using Sphinx syntax? Is it possible to do this with a template, or do I need to make my way through the entire system of builders in order to do this?
source share