The Gatsby homepage mentions Wordpress as a possible data source. I don't evens see mention of their CMS on the front page. The only "service" I see them advertising there is Preview - which seems to be a development collaboration tool. I don't think they're convincing people to move away from Wordpress.
It's funny that the article talks about moving away from your monolithic "CMS system" (redundant?) so that you can use headless Wordpress or Drupal. In other words, you get to toss your monolithic content management system system so that you can keep your monolithic content management system system.
The main problem is not using a large part of your WP codebase (so much for lean and mean) and that some features in WP dont work as expected.
Now you may want to keep WP up to date and the cost for this may be bigger then a head-less SaaS CMS.
Compared to Wordpress, Ghost, and Webflow, it seems the market size for this is limited.
Honestly I got so frustrated with dealing with dependency hell the other day that I only half-jokingly said I was going to go back to writing vanilla ES5, whichever the last version that still works on IE is. It's just too much of an obscure headache, too much tooling and intermediary steps.
I can't get our error reporting tool to work properly because the source maps are a confusing jumble either.
Mind you this is aimed at the JS ecosystem in its current state; Gatsby itself has been great.
You can setup a Next.js system with mostly regular React skills.
I write all this as a 21-year veteran of web development-related work, and in the spirit of respectful disagreement.
> there's no way your "couple hundred lines of code" addressed more than a fraction of the real-world use cases addressed by Gatsby
Gatsby on its own doesn't actually do much. There are plugins to do most useful things. Here's an example: https://www.gatsbyjs.org/packages/gatsby-remark-prismjs/
That is the "blessed" solution for code highlighting. Notice how you have to install 2 different NPM packages, add a bunch of ad-hoc configs (which don't have API docs) then add a bunch of Gatsby specific CSS. Do you see a section about embedding code highlighting in React? No? That's because it doesn't support it (meaning you have to hack it with `dangerouslySetInnerHtml` if you want code highlighting directly in a React subtree, such as a custom layout for a homepage containing a code snippet). The alternative if you were to write a custom script would be to just take 5 minutes to slap prism.js itself in the layout file (which amounts to adding a link tag and a script tag - something a beginner HTML developer can do)
And don't even get me started on migrating from Gatsby 2 to 3 :)
It's also not too surprising to hear that it doesn't support code highlighting out of the box in React given it's a plugin for Gatsby's remark plugin.
However, because we added prismjs as a dependency, you can still use it in React without hacking it with `dangerouslySetInnerHtml` so no idea where you got that idea from: https://pathof.dev/blog/code-highlighting-in-react-using-pri...
I'd be happy if you could point me to a way to use Prism w/ Gatsby that isn't as hacky.
The React-on-server aspect actually has a somewhat profound impact on what you can do. For example, if you have a newsletter subscription component in some other project, there's an almost 100% chance that it won't work in Gatsby because it likely relies on some DOM-related API like onSubmit or onClick
I would actually love to get you started on this point. I have not heard of Gatsby 3. As far as I'm aware, Gatsby v2 is the latest. How do you migrate to 3?
The posters here aren't wrong. It is an overhyped, overbloated, overconfig heavy stack that ultimately renders static html.
I have used them, they are exactly as these posters say.
https://developers.google.com/web/tools/puppeteer/articles/s...
This demonstrates a complete misunderstanding of the problem domain
edit: rather than cheapshot with a throwaway comment i'll expand on this - from my experience what Gatsby provides is an open source pluggable info processing pipeline.
I'm really interested in seeing it develop as a replacement for some of the larger and much more expensive and proprietary internal knowledge and content management systems which provide a ton of plugins to tap into resevoirs and allow you to process/publish internally
If you just want a static site Gatsby is overkill.
This is an entirely serious question. I've got multiple few-hundred-line projects in development at work replacing internal tools - yes, they solve 90% of the use cases but the remaining 10% were generally either ill-advised or theoretical - and I don't know either how to get teams of developers not to build bloated messes or how to communicate that my smaller product shouldn't be taken less seriously for having fewer LOC.
If you know more and have something to teach—and accidental software complexity is an extremely under-taught topic—the burden is on you to establish a context in which real communication is possible. How do you do that? I'm not sure; we could probably exchange notes on this for hours.
May I know why you don't like it and what alternatives you will recommend (if any)? I am considering Gatsby for building a site.
EDIT: I forgot to mention Zola, which I like quite well as far as static site generators go. It doesn’t have the support for multilingual sites that Hugo does, but its templating is much nicer, I think.
Shifter and HardyPress already do so. That gets you all the advantages of static sites, combined with all the advantages of WordPress(ecosystem, tools, affordable labor, easy to use by clients).
Their only major limitation is that they generate/"compile" the whole site, and this takes time.
But that seems solvable by caching(in most cases) and by scaling(which may be easy with serverless). I think it's just a matter of time.
I argue maintainability is the main reason for me to choose Gatsby over WP for projects where the choice makes sense.
You just need to select your plugins from a smaller set, and use external services like disqus for database based service.
And i think with time that thinking could lead to a set of plugins with good security through isolation.
As for hosting complexity - for many sites, this could be hidden from the developer and the client.
And regarding code complexity - how often are custom wordpress plugins or themes(without a site builder) required ? and how much developer time does it take ?
1. Convince the WordPress/enterprise crowd to switch over, both by touting the genuine benefits of static sites (security, scalability, TTFB performance, etc.) and by riding the Cool Kid Front-End Stack hype train.
2. Lock them in with an overly-complicated framework and build pipeline that requires organizations invest a lot of resources into switching. (Gatsby gets most of this for free by building on top of the Cool Kid Stack's nine-thousand-package NPM lasagna.)
3. Sell their captive audience expensive solutions to problems they wouldn't have with other frameworks. (See e.g. another commentor's discussion of incremental builds.)
This strategy might not contribute much to society, but neither do a lot of other startups--what matters to investors is that it'll probably make them a lot of money, assuming they execute it correctly.