Good toolchain for writing a user manual?
Tagged
It’s time to start writing a user manual for diagrams. Haddock documentation is great when you have only, say, forgotten the type of the frobnitz
function. However, it is woefully inadequate when you are just trying to figure out how to wibble your fromps (it turns out, of course, that frobnitz
is quite general and can be used for, among other things, wibbling fromps; but how would you know to look in the Diagrams.Frobnostication
module in the first place?).
So I’m looking for tools I can use to help write and publish the manual. For something short like a tutorial, pandoc works like a charm, but the user manual is going to be a much larger and more complex beast. Here are my requirements. I want to:
- write in Markdown (or some similar sort of markup language)
- have the ability to generate not just a single HTML file, but multiple ones with appropriate next/previous links, a table of contents, and so on
-
include Haskell code and generate a syntax-highlighted version in the output; the source (or something easily generated from the source) should also be an actual, valid literate Haskell file that people can load in
ghci
- have good support for internal hyperlinks, so different parts of the manual can easily link to one another.
And some "nice-to-have" features:
- I’d like easy hooks into the build process, so I can (for example) replace certain snippets of Haskell code with links to the images generated by the code.
-
I’d like to be able to incorporate
doc-review
, or something like it, so people can comment on each paragraph in the manual. - I want to mark some regions as "collapsible" so they will initially be displayed as just a "placeholder" of some sort which can be expanded and collapsed by clicking. These could include things like extra technical information which many readers will not care about, extra explanation for users unfamiliar with Haskell, and so on.
So – any ideas? Perhaps I really want the system used for the Yesod wiki, but I’m assuming it would not be cheap. The most viable thing I have considered so far is using pandoc to generate docbook, and from there generating chunked HTML. This is nice in some ways but not ideal: pandoc actually can’t do syntax highlighting when writing anything other than HTML; I don’t know how I would include collapsible sections; and you can only use two heading levels if you want valid literate Haskell.
It’s quite likely that there’s no single thing that will do exactly what I want, and I’m quite willing to do some “glue” work to put some pieces together. But I’d like to avoid as much wheel-reinvention as possible. Any ideas?