move templates to a dedicated folder, fix index generation

As the index needed a new template, I just moved them to a new folder.
fix random headers, add title

now the header order is set at build time by reading the "headers" key in each .json file.
also, you can add the title to a generated page.
not force "index" if no title is found