Use template to generate an index page