[Haddock] Snap's Haddock styling

Mark Lentczner markl at glyphic.com
Fri Aug 20 22:06:57 EDT 2010


Snap team -

As you know, the Haddock team has been busy working on making Haddock produce "semantic markup", enabling it to be styled via CSS. The new Haddock allows choosing a 'theme' when it is run. A 'theme' is a directory with a CSS file and any auxiliary image files.

We have developed both a new theme, "Ocean", and a "Classic" theme that recreates the old look. These two themes will be part of the release.

During development, I had also experimented with re-creating the look that the Snap web site uses for its Haddock documentation. That work, while not complete, is pretty far along, and the files are attached here as an archive. It is my hope that you'll be able to use the new theme support to publish your documentation with your styling by building a theme.

The tip of the darcs development repo for Haddock (http://code.haskell.org/haddock) has the theme support checked in. If you want to use it now, you can pull that and build it. When run from cabal you can use:

To build doc with just the new theme:
	cabal haddock

To build doc with both new and old theme:
	cabal haddock --haddock-option=--built-in-themes

To build doc with a custom theme
	cabal haddock --haddock-option=--theme=<path to theme dir>

To build doc with a custom theme and the built in ones:
	cabal haddock --haddock-option=--theme=<path to theme dir> --haddock-option=--built-in-themes

The haddock development wiki has a page about the generated markup structure:
	http://trac.haskell.org/haddock/wiki/MarkupConventions

If you have any questions or need any help with the theme work, please don't hesitate to ask: I'd be happy to help.

	- Mark

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Snappy.theme.zip
Type: application/zip
Size: 4451 bytes
Desc: not available
Url : http://projects.haskell.org/pipermail/haddock/attachments/20100820/0c894860/attachment.zip 
-------------- next part --------------


Mark Lentczner
http://www.ozonehouse.com/mark/
mark at glyphic.com





More information about the Haddock mailing list