There are already a few CMSs for static sites, much like the solution you've made. The old-school one is Movable Type, but nowadays there's also one by Netlify, Publii, Siteleaf and a few others. There are also plugins for Wordpress that generate static sites from it (meaning you don't have to expose WP itself to the outside world).
That said, making your own solution can be the best option.
The idea is that Wordpress clients can be used to create content, but the output is a static site served from S3 and Cloudfront.
If you want to try it, send me an email: [email protected]
There's nothing to stop you from using JavaScript in the browser to do any number of things.
There are other solutions, such as using wordpress or contentful to provide content and then regenerate the website when something changes. I think the creator of Gatsby is creating something like that as a business.
It doesn't handle authentication, so you'll need to put /admin under authentication on the web server level, but it allows you to edit and write pages, save them to drafts, view them as drafts, publish them, modify their metadata...
The only downside is image hosting, where the friction is still a bit too high.
As I tested myself several SSG, I (as many it seems !) thought « Well, none fit my needs so let’s make one »
My problem was that I need an interface for the final clients, which are no tech at all, to be able to edit content.
Solutions like Hugo are not possible as it would means install it on a computer at the client office, and make him/her understand how to deploy. No go.
As the post states, they would also have to learn some stuff. Even more no go.
So for those case, the solution is to use a CMS like Wordpress. Which I don’t want.
So I built my own, using the best of both worlds.
For the backoffice, for managing content, a PHP/MySQL classic, with a media gallery and a tinyMce. Pages are in categories which can have subcategories and pages, as deep as you want.
Each page must have a template.
A preview button (which is the key) and an export site button.
And that’s all.
Of course, it only suits my needs (as me or some clients like web agencies will be in charge of the templating) and have no means of going public, so don’t fit what OP was looking for.
But it works, it was a two days job to create, and as it’s all mine, I can add any functionality I want.