I'm running a Flask website https://www.example.org that is hosted on Heroku, with an attached static blog, https://www.example.org/blog which I generate through Hugo and I'm looking to make this process more efficient
Based on my research, having the blog in a subdirectory is preferable for SEO reasons.
My current workflow with maintaining the blog is as follows:
- Write Markdown post in Hugo
- Check to reconcile css etc between Hugo and Flask app
- Generate the static html code
- Fix link errors etc.
- Move static output from hugo/public folder to flask_app/static/blog folder
- I'm using
whitenoiseto access the static folder - Deploy to Heroku --> https://www.example.org/blog served via Flask
I realize that serving static content via Flask is less computationally efficient (which is acceptable) but this is not a major problem right now.
But I'm sure there must be a better way ?!
from Heroku: How to integrate static site generation with Python / Flask
No comments:
Post a Comment