Updated to handle index.html template