Move static generation to uppermost app.py