create function for generate index.html