Htmlfontify provides a means of converting individual Emacs buffers, source files, or entire source trees to html, preserving formatting and Emacs colorization / syntax highlighting as much as possible through careful application of CSS stylesheets and html tags.
It can also turn instances of functions, methods and (for some languages) variables and other constructs and items into links to their definitions, and create an index file (or files) of all such symbols, also linked to their points of definition.
Htmlfontify also provides several customization items, which should allow it to mesh more-or-less seamlessly with various templating or publishing systems (in the event, for instance, that you don’t want to produce the html pages directly).