Rewrite site using templates