Hacker News new | ask | show | jobs
by wilsonfiifi 3131 days ago
Disclaimer: I'm and python and go(lang) developer.

The main problem I've had with regular CMSs (DjangoCMS, Wagtail, ...), is the sometimes steep learning curve associated with them and the less than ideal deployment options (especially if you've been spoilt by Heroku, Dokku et al.).

I like the idea of headless CMSs but currently the only available open source ones that i know of are written in PHP or Javascript (Node.js). Also when you're done building your data models and adding your content, you still have to build/deploy another app to access the data.

Flat file and static CMSs (Lektor for example) are great until you need some server side processing and then you're forced to make use of a 3rd party provider (for form processing and so on).

For me, the sweet spot would be a headless CMS that behaves like a static site generator and can be embedded in my Flask app as an extension.

1 comments

Why not both? Most frameworks (including Flask) already have static file/page tools/middleware. Just set up the static file hosting part of your framework. At that point it is "merely" a CI/CD issue to compile your static site and deliver it to the static directory your framework expects.

Python frameworks, owing to the Django CDN-focused approach, tend to make static assets harder than they have to be, so the answer to a better approach for Python in specific is often to setup the static asset hosting more directly in your web server than in your framework. But that too is "just" a configuration/CI/CD issue.

Finally, an approach that is increasingly common is simply to treat your own dynamic server-side assets like a "3rd-party" API: host it on something like api.example.com and let your main website just be the static app served from a static file server/CDN.