michael / editable-website

A SvelteKit template for building CMS-free editable websites
https://editable.website
MIT License
1.52k stars 121 forks source link

Static "Mirror" build without the editor tools #6

Closed nilskj closed 1 year ago

nilskj commented 1 year ago

Awesome thing! I'm playing around with it a lot and I like the simplicity in it's abstractions. Would it be possible to have a static build of the site without the editor tools? As I understand we ship the whole thing with editor etc even though that stuff will only be used by the editors.

Implementation ideas

I'm not sure if this is a good idea, since I quite like the "embedded" fashion and don't want the complexity of another static build. It takes this into the direction of the other CMSs which I don't like. But I don't like shipping a lot of code for editing when only a fraction of the visitors will be able to use it anyways.

michael commented 1 year ago

Yeah, as you say the challenge is to avoid additional infrastructure and code branches so we don't end up with complex build/publishing workflows again. Still a "static mirror" may be interesting for high traffic websites, so I'm keen to have a solution for that at some point.

However, short-term a good first step would be await import so that the editor-related bits are only loaded when logged in. Would you be interested in working on a PR that adds that? :)

nilskj commented 1 year ago

Yes that solution sounds like the least complex and still adds value. I can give it a shot :)

michael commented 1 year ago

Well done! Thanks a lot.

nilskj commented 1 year ago

The implemented solution is balanced in regards to added complexity for value IMO, closing issue.