5 ms·
You could throw Jekyll, Middleman, Pelican or Hugo on the server and run their build command with a git hook. Then you'd get the same result, but a completely s
by jalami 10y ago
You could throw Jekyll, Middleman, Pelican or Hugo on the server and run their build command with a git hook. Then you'd get the same result, but a completely static website without the server needing flask to piece together pages when a user hits the site.
The build times wouldn't be instantaneous as it would need to regenerate all the pages, but Hugo is still really snappy for even a large site. You probably post less than users access anyway.
This would still check all your boxes:
No database
No server side auth
Non-public drafts (metadata)
Commit from anywhere
Bonus: Dumb serving (only prebuilt static pages)
Optional bonus: Shortcodes, themes, bells whistles
The site would be built on the server so it wouldn't be completely dumb like rsync-ing static pages to nginx or something, but that's the rub if you want to be able to use clients with only git as a dependency.
Yours is a good solution, I'm just throwing an idea out there for a pre-baked alternative. My original use case didn't call for mobile blogging (not a fan), I run my own gitolite server so auth is already in my camp and I have a multi-tooled build that I didn't want on the server. If something breaks, it happens on my machine instead of on my server.
Also just a tip, maybe you want to put a <noscript> tag around an expanded copy of your hamburger menu. Without javascript, your website navigation is broken because you can't expand the menu.
Edit: by client, I mean blog-editing-computer not blog-reader's-computer.
- snehesht 10y agoWhat you said is true but where's the fun in it. I started this project as a simple django blog, included react little later and then scratched the whole thing and finally built this. It was fun working on this. About the menu, I was planning to update it to hamburger icon with animations. For now the icon doesn't change and the menu is injected into adjacent/bottom element based on screen size. Thanks your feedback though.
- GeneTT 10y agoWhat you describe is pretty similar setup to my blog. Im using Jeykll with Bitbucket Pipelines, when I push it builds the site and uploads it to S3.