Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I get a "Style" menu in my Haddock documentation?

Some packages (the Haddock documentation for example Data.String.Utils) have a menubar that includes a "Style" menu that allows choosing among styles used to display the documentation:

enter image description here

How do I get this menu in the documentation for my own packages? What setting should I use to include it, and how do I specify which styles are offered?

I've tried things like

haddock
  -- ...
  css: /path/to/mystuff.css, Default, Ocean
  -- ...

and

haddock

  -- ...
  css: Default
  css: Ocean
  css: /path/to/mystuff.css
  -- ...

In my ~/.cabal/config; but the former fails and the latter just formats using the last-listed css entry, with no "Style" menu.

like image 307
orome Avatar asked Sep 22 '15 20:09

orome


1 Answers

This feature is implemented with the --theme flag to Haddock: https://haskell-haddock.readthedocs.io/en/latest/invoking.html#cmdoption-theme

like image 162
Ari Fordsham Avatar answered Nov 11 '22 12:11

Ari Fordsham