Get rid of pages arg to generate_html() and fix its test.