To take this concept one step further towards perfection, you would want to lose the backend completely and persist directly to a git repo using https://isomorphic-git.org/

It stinks github or gitlab or any free git hosting providers didn't work with isomorphic git.

I like the idea! You would still need something to serve the HTML file, but that isn't so bad.

But in my experience the potential audience shrinks significantly once anything git related is expected from a user.

And if keeping in local storage a list of all pages, you can create an index html automatically in a predefined format which makes it more of a database rather than loose documents.