News for hackers. Stuff that matters.
Re:The complicated futility of WordPress by seanwilson on Tuesday February 01, 2022 @10:15PM (#30173226)
Are there any good options for an open source headless CMS that works with a static site generator that has a page builder that has quick and accurate live previews before you deploy? E.g. so you can build new landing pages from header, testimonial and contact form blocks.

There's lots of options if you just want Markdown but this isn't enough for heavily branded business websites where you need to check how complex pages will look before they go live, like if the h1 text in the header line wraps weird or is hard to read against the header background image.

Edit: I get that CMS projects need to make money by the way but the lack of vendor lock-in is a big upside to WordPress.

Netlify CMS might be an option (https://www.manuelkruisz.com/blog/posts/custom-previews-next...)?

Re:The complicated futility of WordPress by imilk on Tuesday February 01, 2022 @11:58PM (#30173893)
Directus is an amazing open source tool that you can self host as easy as deploying a Node app. You can setup content types with a nice UI, very configurable roles so a client can't break the site, a media library that can hook into S3/DO Spaces, a REST or Graphql API built in, webhooks, revisions, works with many different DBs, and a bit more I'm not thinking of.

I'm not affiliated with them at all. Was just very pleased to find how polished it is for a self hosted, free product compared to the other $499/mth proprietary options in the space.

https://directus.io/

https://github.com/directus/directus

Re:The complicated futility of WordPress by prog5 on Wednesday February 02, 2022 @12:13AM (#30174005)
This looks amazing thank you. I'm curious about the REST API part. Have you used that before? How configureable is it? It sounds like a scaffold of some sort... but, what if I needed to do some custom data processing on the data before returning it in the API, are there hooks for that?
Re:The complicated futility of WordPress by imilk on Wednesday February 02, 2022 @12:41AM (#30174169)
I'm not an expert since I used it for a few projects about a year ago. But the web hooks are mostly for when items are added/updated/deleted.

They have pretty useful API parameters for transforming images. But my initial instinct is to say that you'll have to do custom data processing in the front end or somewhere else, since the API it generates just mirrors the structure of your database. The nice thing about this approach is that you can always remove Directus from a project and your database will function as normal.

They also have pretty use docs which you can check out for your usecase:

https://docs.directus.io/reference/introduction/

edit: I should also add that you can add your own custom modules, but I never really explored that too much.

Re:The complicated futility of WordPress by sneek_ on Wednesday February 02, 2022 @08:30AM (#30177200)
Hey prog5, you should check out Payload CMS if you need that type of flexibility and extensibility. Payload has Hooks that allow you to do exactly what you're saying.
Re:The complicated futility of WordPress by seanwilson on Wednesday February 02, 2022 @12:38AM (#30174155)
Any links to how page building and live previews look?
Re:The complicated futility of WordPress by imilk on Wednesday February 02, 2022 @12:46AM (#30174206)
You can make a page builder using it, but you're going to have to create content types for each block with many to many relationships to pages. It's not going to function like a WP page builder, but it also would allow you more control over what a client can add to a page.

Don't think there are live previews, but I might be wrong (people can create custom modules, like plugins, and I haven't checked in on it for a year or so).

One use case we made is a place where a non-tech savvy marketing manager at a chain of retail stores can enter/edit the store info & deals for each location. Then the info & deals then get updated on the stores' app, website, and on site displays from a single UI.

Re:The complicated futility of WordPress by o_m on Wednesday February 02, 2022 @04:40AM (#30175529)
A basic feature all headless CMS's don't have is nested pages/documents. It is how the web works, so why have they all agreed to not have the feature?
Re:The complicated futility of WordPress by throw0101a on Wednesday February 02, 2022 @07:08AM (#30176457)
Nesting is not necessary for the web to work.

Wikipedia/Wikimedia does not have nesting: each page/topic is its own top-level article without hierarchy. Meanwhile BookStack, another open source wiki platform, does have hierarchical organization.

Re:The complicated futility of WordPress by throw0101a on Wednesday February 02, 2022 @07:04AM (#30176435)
> Are there any good options for an open source headless CMS that works with a static site generator that has a page builder that has quick and accurate live previews before you deploy? E.g. so you can build new landing pages from header, testimonial and contact form blocks.

WordPress with a plug-in that spits out the static site? E.g.:

* https://wordpress.org/plugins/simply-static/

Edit/update via GUI, generate the static site, view it locally, rsync it to your hosting provider.

Re:The complicated futility of WordPress by andrei_says_ on Tuesday February 01, 2022 @10:48PM (#30173447)
CraftCMS is great and free for single admin. Can’t recommend it enough.

If combining with a static site generator you can find craftcms hosting for $5/month.

Re:The complicated futility of WordPress by seanwilson on Tuesday February 01, 2022 @10:56PM (#30173505)
Re:The complicated futility of WordPress by ivanmontillam on Wednesday February 02, 2022 @12:09AM (#30173975)
It doesn't have to be open source to be successful.

I understand that open source things can increase reach of the product, but that's at the expense of proper software support.

Let's accept some proprietary software in our lives. Sometimes these have demostrated technical superiority.

Re:The complicated futility of WordPress by gnz11 on Wednesday February 02, 2022 @09:16AM (#30177814)
> I understand that open source things can increase reach of the product, but that's at the expense of proper software support.

Lots of open source projects offer premium support.

> Let's accept some proprietary software in our lives. Sometimes these have demostrated technical superiority.

Sure, but let's not pretend proprietary vendors know more than open-source projects and contributors. Also, if your product is ultimately the content itself, it's an enormous risk to hand that over to third parties that want to take control of it. You are explicitly coupling yourself to the success of the proprietary software vendor.

Re:The complicated futility of WordPress by andrei_says_ on Wednesday February 02, 2022 @02:02AM (#30174646)
I believe the source is available on github and the team accepts pull requests. Single user license is free.
Re:The complicated futility of WordPress by amiga-workbench on Wednesday February 02, 2022 @05:34AM (#30175876)
We're currently having painful performance issues with Craft at work. It takes 300ms+ just for an empty craft installation to return an empty page. Saving entries to the database programatically is slow too, one of our sites has a nightly sync process, only needs to touch a few thousand entities, with a normal database schema that workload is doable in seconds, with Craft it takes hours.
Re:The complicated futility of WordPress by 1123581321 on Monday February 07, 2022 @06:19PM (#30252886)
Did you figure it out? Something's clearly wrong with your hosting or database.
Re:The complicated futility of WordPress by andrei_says_ on Wednesday February 02, 2022 @03:32PM (#30183614)
Their support is super responsive on discord and via email.

And yes Craft’s schema is pretty complicated.

Re:The complicated futility of WordPress by shortformblog on Wednesday February 02, 2022 @06:18AM (#30176130)
I run Craft CMS for Tedium (https://tedium.co). I could push it further but one way I use it is by creating a custom view that “spits” out a completed email template with all of my desired layout considerations and quirks already considered. I could push it further and run the newsletter through Craft itself, though I’ve chosen to pay someone to manage the sending of the email.

(And while not particularly “Crafty,” I use a paid plugin, Doxter, to manage my CMS code in Markdown, with the use of shortcodes.)

The performance issues mentioned by others are realistic, but if you put it behind CloudFlare, they’re totally reasonable. While Ghost is a much more popular use case for newsletter publishers like myself, I prefer the customization capabilities of Craft to forge a CMS experience I’m comfortable with.

Re:The complicated futility of WordPress by joshvm on Tuesday February 01, 2022 @10:53PM (#30173479)
Depends how complex you want. Jekyll --watch is fine for testing blogs and reloads very fast with --incremental builds. We have it set up with a self hosted netlify for editors - updates get pushed to a repo by netlify, the repo is watched by Google cloud build and the site is automatically updated on save. All on free tier services. Frequent updates will hammer the build server (if you build on each push) so could eg push to a dev branch and merge-to-main with a cron job every so often.

You could run a dev server and port forward the preview if necessary.

Re:The complicated futility of WordPress by atoav on Wednesday February 02, 2022 @03:27AM (#30175132)
I use lektor, it has a preview server with a editor, works for multilanguage sites, themes are easily extended/modified etc.

You basically run "lektor serve" edit your site locally in the backend and then once you are done you click "publish" in the backend and it copies the site to the webserver via scp (provided you have the ssh credentials).

Simple and effective. For anything more sophisticated I use grav CMS

Re:The complicated futility of WordPress by wingmanjd on Wednesday February 02, 2022 @11:52AM (#30180125)
I love GravCMS. I transitioned to Grav from Drupal right as D8 was coming out for my personal projects. Not having to worry about a db was so nice
Re:The complicated futility of WordPress by omnimus on Wednesday February 02, 2022 @06:17PM (#30185616)
I used to use Grav. If you want similar more mature and “zen” try Kirby CMS. I am not afiliated but ive been loving it for years. It’s commercial product but i think of it as high-end Grav. More polished and with better admin interface. Actually since Kirby is older i believe Grav was inspired by it a lot.
Re:The complicated futility of WordPress by atoav on Thursday February 03, 2022 @12:57PM (#30195985)
Thanks for the hint I gotta check it out.
Re:The complicated futility of WordPress by vgb2k18 on Wednesday February 02, 2022 @07:24AM (#30176566)
Re:The complicated futility of WordPress by imilk on Wednesday February 02, 2022 @12:14PM (#30180515)
Never heard of this before, but it does look very useful.
Re:The complicated futility of WordPress by askbill on Wednesday February 02, 2022 @12:04AM (#30173936)
We use WordPress with the Gutenberg editor and Gatsby Cloud. It’s been very nice to work with and the Gatsby Cloud team seems to pay a lot of attention to the editorial and deploy experience. We’re happy and this is how we’re building things today.
Re:The complicated futility of WordPress by dgellow on Wednesday February 02, 2022 @05:06AM (#30175707)
Not sure if that’s what you describe but I used Grav: https://getgrav.org/.

It’s written in modern PHP and provide a simple UI to edit an manage your site. No database is needed.

Re:The complicated futility of WordPress by mortenjorck on Wednesday February 02, 2022 @11:43AM (#30179979)
Grav is fantastic. It’s as flexible as ProcessWire, yet with the simplicity and low overhead of a flat-file CMS. I’ve used it for sites ranging from a portfolio to an experimental art project.
Re:The complicated futility of WordPress by chyeah on Tuesday February 01, 2022 @10:30PM (#30173329)
Prismic's "slices" might be what you're looking for if you want out-of-the-box functionality and hosting.

If you're wanting a bit more flexibility from a code-perspective (and you don't mind TypeScript), I've found Payload CMS to be a great option to build out a page builder as you've described using their "blocks".

Re:The complicated futility of WordPress by seanwilson on Tuesday February 01, 2022 @10:37PM (#30173372)
Looks like Prismic and Payload CMS aren't open source?

https://github.com/payloadcms/payload/blob/master/license.md - "Payload is free to download and install—and free to use for Personal Purposes. We are passionate about Payload, and we hope that you will enjoy it, too. A valid license is required to utilize Payload as detailed below"

https://prismic.io/faq/product - "Proprietary, not open source"

Re:The complicated futility of WordPress by sneek_ on Wednesday February 02, 2022 @08:33AM (#30177239)
Ahhh thanks for the shout out to Payload! I'm one of the founders. seanwilson, Payload is technically open source and completely free forever for up to one admin panel user. There are no restrictions at all besides that and the code is fully open on GitHub.

Would this model work for you, or would you like to see changes to our current model?

Re:The complicated futility of WordPress by seanwilson on Wednesday February 02, 2022 @05:40PM (#30185133)
> Payload is technically open source and completely free forever for up to one admin panel user.

Can you explain how the licensing works here? If it's open source, couldn't you modify it to allow more admin panel users? Can you self-host with no reliance on other hosted services or paid licenses?

Re:The complicated futility of WordPress by chyeah on Tuesday February 01, 2022 @11:11PM (#30173616)
Ah, you are correct. I missed that aspect of your question.
Re:The complicated futility of WordPress by marc_io on Wednesday February 02, 2022 @12:54AM (#30174255)
Stackbit can do that in its premium plan. It's not open source, unfortunately.

https://docs.stackbit.com/conceptual-guides/modeling-storing...

Re:The complicated futility of WordPress by xyzzyrz on Tuesday February 01, 2022 @10:26PM (#30173304)
For building these kinds of pages, there are now actual page builders worth considering that work with various frameworks, like https://www.plasmic.app which also lets you drag and drop your own components/blocks.
Re:The complicated futility of WordPress by seanwilson on Tuesday February 01, 2022 @10:30PM (#30173330)
Doesn't look like it's open source: https://forum.plasmic.app/t/any-plans-for-self-hosted-plasmi... "We don’t currently have plans for a self-hosted solution"
Re:The complicated futility of WordPress by hunterb123 on Tuesday February 01, 2022 @10:22PM (#30173282)
Yes, Strapi (https://strapi.io/) though I'm not sure about previews.

https://www.sanity.io/studio is open source, but some parts of the CMS aren't I don't think.

Possibly there could be an adapter to use Sanity Studio w/ Strapi?

Re:The complicated futility of WordPress by seanwilson on Tuesday February 01, 2022 @10:31PM (#30173335)
Looks like Strapi has paid only features. Are these significant to most sites?

https://strapi.io/pricing-self-hosted "Free...Up to 3 default roles"

https://strapi.io/blog/introducing-strapi-enterprise-edition...

Sanity.io doesn't seem to be fully open source: https://github.com/sanity-io/sanity/issues/978

"You can only run the Studio connected to the Sanity hosted backend. There is no option for connecting the Studio to another backend."

Re:The complicated futility of WordPress by lucas_codes on Tuesday February 01, 2022 @10:52PM (#30173471)
I'm using it. The docs leave a little to be desired if you're customizing (they just released a new major version), but you can customize and replace the rich text editor with your own, add a preview button, add a deploy button, etc.

If you want a wordpress replacement though, there will be a big learning curve as it's a general-purpose CMS, not specifically for blogs.

Re:The complicated futility of WordPress by hunterb123 on Tuesday February 01, 2022 @11:29PM (#30173712)
StrapiCMS is MIT licensed and any role limit could easily be mitigated.
Re:The complicated futility of WordPress by seanwilson on Tuesday February 01, 2022 @11:35PM (#30173747)
https://github.com/strapi/strapi/blob/master/LICENSE "* All software that resides under an "ee/" directory (the “EE Software”), if that directory exists, is licensed under the license defined in "ee/LICENSE"."

What features does that impact?

Re:The complicated futility of WordPress by hunterb123 on Tuesday February 01, 2022 @11:43PM (#30173808)
I don't know? If some functionality is desired, alternative backends could be developed.

If the only limitation is 3 roles apparently, then admin, manager, and writer could be acceptable for most companies.

Re:The complicated futility of WordPress by pictur on Wednesday February 02, 2022 @01:40AM (#30174542)
strapi is an exciting project that is trying to do too much, but I don't think they are a good alternative to WordPress. They need to stop adding features and start making it work stable.
Re:The complicated futility of WordPress by illuminea on Thursday February 03, 2022 @07:27AM (#30191584)
You can try Strattic - it turns WordPress into a static site generator so you can use page builders etc. as usual, and then in one click generate the static version of the site. https://www.strattic.com
Re:The complicated futility of WordPress by chris_wot on Wednesday February 02, 2022 @06:39AM (#30176261)
What is a headless CMS?
Re:The complicated futility of WordPress by detaro on Wednesday February 02, 2022 @06:41AM (#30176271)
A CMS without the consumer-facing frontend. (i.e. just storage and backend editing UI, with APIs exposed you can hook a custom frontend to)
Re:The complicated futility of WordPress by jawngee on Wednesday February 02, 2022 @12:33AM (#30174116)
+1 Directus