Output json and build HTML pages