Need help with a Twig template error
It looks like you're missing a closing {% endcache %} tag towards the end of your template.

(See https://docs.craftcms.com/v3/dev/tags/cache.html)

You might also be missing a closing {% endminify %} tag too, but I'm not sure if you've posted the whole of your template or not.