Is there a Flask or Jinja2 configuration flag / extension to automatically minify the HTML output after rendering the template?
I've written a flask extension to achieve that purpose. You can install it using pip install flask-htmlmin and the source is available at https://github.com/hamidfzm/Flask-HTMLmin . Hope it will be useful.
pip install flask-htmlmin