support both index.json and index.html