I usually use
Slidy with a custom Makefile and
xsh scripts to validate XML/HTML files and replace
<?code example1.pl ?> with syntax highlighted content of the script,
<?out example1.pl ?> with its output, etc. I'm not sure it's the easiest, but if you're fluent in HTML, it's comfortable.