You need to read Requesting Help and share your code. We need to see all the templates working together to see how it works, and we need to clone and build the site locally to really be helpful.
Also, Statistics.html should probably be in static, for that link to work. And don’t use that https://localhost:1313/ as a baseURL, it will cause problem.