Live data from Hacker News

A SvelteKit template for building CMS-free editable websites

editable.website

21–30 of 85 posts

Re: A SvelteKit template for building CMS-free editable websites

#21
CMSs really are painful. I've spent more time making Ghost work on domain.com/blog (despite content marketing being one of the main reasons to drive people to your website, Ghost doesn't support this) than I have to write a CMS before.

Looks like it uses Postgres: https://github.com/michael/editable-website

Re: A SvelteKit template for building CMS-free editable websites

#22
As far as I understand it, the dynamic website you use is the same as served to the client minus the editing parts? Would it also support a scenario where the dynamic part runs on one host, say inside an intranet and users can "publish" to pre-configured static hosts or s3 buckets with a click? Static hosting could be enough for many sites and one could combine the technical and UX advantages of your dynamic interface with the advantages of static sites for security and distribution.

I found that useful when i worked with https://www.getlektor.com/ years ago. In lektor the dynamic part runs on a users desktop machine, but it of course wouldn't need to.

Re: A SvelteKit template for building CMS-free editable websites

#26

SvelteKit is such a breath of fresh air, glad to see it used on this.

It really is - writing a svelte component feels like writing something in vanilla html/js/css, but you get all the advantages that come with a framework.

I just can't get over the `$:` reactive label syntax.

TypeScript support can be hit or miss, and there could be more improvements around the stores API

Re: A SvelteKit template for building CMS-free editable websites

#27

Cool idea, and I really like how the site still functions for readers with JS disabled, which is (as far as I'm aware) uncommon for this sort of thing. One thing that isn't clear from reading the GitHub page — do all visitors end up downloading the editor payload or do only admins who are logged in get that?

Excellent question. They do end up downloading the extra payload at the moment. It's something that could be optimized with `await import` in the future.

My general approach to this is considering website development as "minimal web app development". Think of it as developing your very own little Facebook thingie, where people could log in and post and edit stuff, without thinking about the technicalities.

My feeling is that, thanks to abstractions like Svelte, this is not super difficult anymore and my hope is that in many cases this approach could replace integrating a CMS. At least for me it feels much more natural like this, and really all I have to know is some HTML+CSS, the SvelteKit API and SQL to model my content. Just like in the old days, where you didn't have to depend on 100 things to make a website. :)

Re: A SvelteKit template for building CMS-free editable websites

#28

Earlier quoted context omitted.

It really is - writing a svelte component feels like writing something in vanilla html/js/css, but you get all the advantages that come with a framework.

I just can't get over the `$:` reactive label syntax. TypeScript support can be hit or miss, and there could be more improvements around the stores API

I am sure I am in the minority at this point, but the lack of TypeScript proliferation to me is a plus.

Re: A SvelteKit template for building CMS-free editable websites

#29
post #24

I think this pitch overstates the problem with CMSes. It seems for many organizations, their CMS is working well for them. Not saying this doesn't have benefit, but, as for me, I rather like my CMS and don't feel like this is a big win.

> It seems for many organizations, their CMS is working well for them.

I hope to work in one of such orgs some day because the most common experience I've witnessed was pain.

And things don't improve when you throw more money at a CMS. There's an entire industry of enterprise CMSs (yearly license in five figures) and their users aren't any happier with their CMS than WordPress users.

Re: A SvelteKit template for building CMS-free editable websites

#30
post #18
post #15

Is contenteditable not widely used? Is it too limited? https://developer.mozilla.org/en-US/docs/Web/HTML/Global_att...

contenteditable is pretty terrible if you want it to behave exactly the same on all browsers. that's why there are projects like CKeditor or TinyMCE.

Yes, the challenge is taming contenteditable. I'm using ProseMirror under the hood with custom models for and editing, which you can adapt to your needs. One limitation (of ProseMiror) is that you don't have shared undo/redo across multiple editable areas. That's something we've solved with our own library Substance.js a while ago, but the API would be too verbose for this type of use-case, and we didn't reach that level of stability that ProseMirror has today. Web-based rich text editing is a very interesting space to watch, that imo affects web development in general.

I wrote about it here in more detail: https://letsken.com/michael/how-to-implement-a-web-based-ric...

Post reply on HN