News for hackers. Stuff that matters.
Re:Goodbye Wordpress, Hello Jamstack by wjohnsto on Friday October 08, 2021 @11:50AM (#28800586)
It's important to know that WordPress can be used as a headless CMS. There is active work in that area with plugins like WPGraphQL[0] and frontend frameworks like Faust.js[1]. So you don't _need_ to leave WordPress in order to use some of the tools and gain the scaling benefits of JAMstack.

[0] https://www.wpgraphql.com/ [1] https://faustjs.org/

Re:Goodbye Wordpress, Hello Jamstack by Dunedan on Friday October 08, 2021 @12:21PM (#28801026)
There's another approach which works surprisingly well: If you use Nginx and PHP FPM you can utilize Nginx FastCGI cache [1] to cache dynamic contents. That even allows serving a stale version of an asset while fetching an up-to-date version in the background, avoiding the occasional slow requests for expired items.

With such a cache enabled Wordpress sites feel like they're static pages, while they still offer all features Wordpress offers.

Here is an example for a tutorial on how to configure that for Wordpress: https://easyengine.io/wordpress-nginx/tutorials/single-site/...

[1]: https://nginx.org/en/docs/http/ngx_http_fastcgi_module.html#...

Re:Goodbye Wordpress, Hello Jamstack by ridings on Friday October 08, 2021 @12:01PM (#28800735)
I don't disagree. There's lots of options for the content part. I guess the thing I was trying to point out here was that I didn't need a CMS. The content is static, the site is basically a brochure. I was happy just writing static HTML.
Re:Goodbye Wordpress, Hello Jamstack by busterarm on Friday October 08, 2021 @11:59AM (#28800701)
It doesn't even have to be this hard -- just be familiar with how the WordPress database lays out its custom post types.

I wrote a Jekyll Generator plugin that just makes a SQL query to the WordPress database and generates all of the sites' content a good 5 or 6 years ago. It's fairly trivial work.

Re:Goodbye Wordpress, Hello Jamstack by wjohnsto on Friday October 08, 2021 @12:02PM (#28800757)
You're right and your approach works well for all the mostly static content. The tools above are useful if you want to enable things like authentication/gated content, e-commerce etc while also having some static content.
Re:Goodbye Wordpress, Hello Jamstack by handrous on Friday October 08, 2021 @12:11PM (#28800867)
WP also has an HTTP-speaking API, but yeah, I've done the "extract posts and pages directly from the DB" thing too. It's maybe half a day if you've never looked at the WP DB schema before, mainly figuring out which tables & fields you need to look at to select only published items. Probably minutes if you're already familiar with it.
Re:Goodbye Wordpress, Hello Jamstack by ridings on Friday October 08, 2021 @07:50PM (#28805549)
entirely agree with you. Problem is I didn’t need a CMS. I was using Wordpress as a design tool.