Settings

Theme

Announcing Gatsby 2.0.0

gatsbyjs.org

104 points by kylemathews 7 years ago · 35 comments

Reader

pknopf 7 years ago

I tried using Gatsby for a project of mine. The moment I tried to do anything not supported OOTB, it seemed I was fighting the tooling (and webpack) at every corner. It was incredibly difficult just to get a simple tree navigation.

One thing I thankful for though is that it gave me a new-found love for the simple and non-flashy libs/tooling.

In the end, I wound up writing my own static site generator.

https://github.com/pauldotknopf/statik

You may say to yourself "So you just wrote your own Gatsby!?"

No, I didn't. I wrote a thin lib that you can register endpoints and extract them to disk. It does absolutely nothing else. The idea is that I will wrote my own markdown rendering, navigation, html/css, etc for each project. "But what about the time it takes to implement all the features you need!" The time it takes to implement these minor things take far less time in the long run, and I will never have to be in an endless fight with the tooling to get simple tree navigation. Every feature I implement is exactly what I need, no more, no less.

Sure, it isn't as cool as React, webpack, etc. But I'm a lot happier.

  • cfowlerdev 7 years ago

    Another great alternative is React Static. I moved to React Static after having the same issues with fighting with Gatsby plugins, the superfluous graphql environment for simple content handling, and finding that at the time Gatsby didn't scale well with larger websites.

    https://github.com/nozzle/react-static

  • hnzix 7 years ago

    Did you evaluate Jekyll or Hugo for your use case?

    • pknopf 7 years ago

      I did. IMO, Hugo is the closest of any static gen to hitting the sweet spot of simplicity and feature set.

      However, there were some features that I simply could not add to it. Features that if I didn't have the tooling bogging me down, I could implement in 10 minutes.

      https://github.com/gohugoio/hugo/issues/3659

      I can't fault Hugo for that GH issue though. The author's response is valid.

      I know I sound grumpy. Hugo is great. It is a far better option than Gatsby. The features that it has are very simple and straightforward (no graph nodes/graphql/webpack-esque abstractions). I actually highly recommend Hugo.

      edit: To add onto my original comment, I encourage people to read this blog post.

      http://tonsky.me/blog/disenchantment/

      • annywhey 7 years ago

        I took the approach of bolting a second compiler on top of Hugo(a custom Python script) to get the extra things I wanted in Hugo.

        It still took a while, but I did get to leverage the parts of Hugo that already work well.

        I don't think there's much in the way of winning either way, since now I have a Build Process.

amanzi 7 years ago

I hadn't heard of this before but it looks really good. Good documentation, lots of plugins and community support, and appears to be in use by some big companies. Anyone here had good or bad experiences with it?

  • pknopf 7 years ago

    See my top-level comment. I've had bad experiences with it. It is a bohemeth, especially considering we are just-ish turning markdown into html.

    There is way too much ceremony.

  • nazka 7 years ago

    I am starting to do my blog with it and so far it's really good. One thing I love is how it is built to be a Progressive Web App. If you don't know what that is: after downloading your page, your browser will start to download the other pages of your website automatically so they will be able to render instantly. It's also amazing for documentation. You go on one page and the other pages will be preloaded so that means that even without network you can still browse all the pages and again with rendering instantly. Go on their website and check in the Chrome DevTool in Network, you will see.

    Another thing I like is how they leverage GraphQL. I am not a fan to use it as a back end language but for a query tool existing only on the front it all makes sense and it's really effective. You can easily build query to generate all kind of pages and contents automatically. And that from all kind of sources (markdown, CSV).

    There are many other great stuff like their source/transform plugin to be able to query on any (if the plugin is made) source.[1] Or having to only learn 2 API call (onCreateNode, onCreatePage) and GraphQL to start to do many of the biggest things... Or I can talk about how when building the project Gatsby makes all the call to any headless CMS to retrieve all the data to leverage them while still being able to create a static website at the same time...[2]

    Finally Netlify provides a dead simple way to host your project. You just need to create an account and link your Github repo on their platform and every time your master will change your website will be automatically deployed. Ho and it's free...

    [1] https://www.gatsbyjs.org/docs/source-plugin-tutorial/

    [2] https://www.gatsbyjs.org/docs/wordpress-source-plugin-tutori...

    • BigJono 7 years ago

      Progressive Web Apps aren't universally a good idea. I'm sharing a 6Mb/s down link with 5 other people. The absolute last thing I want is every website to pre-cache 40 pages for every page I browse.

      • kylemathewsOP 7 years ago

        Absolutely!

        Gatsby tries to balance making your site work at some level offline w/ not precaching too much.

        By default we cache the front page & then do "run-time" caching as the user visits different pages so ensuring they can at least return to the pages they've visited when offline.

      • captain_crabs 7 years ago

        This is a good point. But I think PWA's are still better than monstrous everything chunks. It would be good to make pwa's configurable to user preferences

    • gammateam 7 years ago

      that's pretty cool

      I'm deep down the Vue.JS rabbit hole and can really appreciate this stuff

      Out the box reactJS with the best practices already? maybe next project!

      • nazka 7 years ago

        Yes I am a React dev myself and so far it has been really cool :)

  • tekmaven 7 years ago

    I’ve been using it since the 1.0 timeframe. The SEO went through the roof on my low traffic few post personal blog when I switched to Gatsby.

ValentineC 7 years ago

I built a landing page for a nonprofit I'm involved in [1] with Gatsby v2 (while it was in beta/rc), with close to no knowledge of the Webpack and React ecosystems. It's been fairly pleasant to work with, and I look forward to building more sites with it and contributing back where I can!

It was also fun to see my site achieve 100% with ease on Chrome's Lighthouse tests. I still have no idea what kind of impact it has on SEO, but every little bit helps.

Thanks to all who contributed!

[1] https://cu.sg

SkyPuncher 7 years ago

My startup's website is currently built on Gatsby. I originally looked to it because we wanted to get something up very quickly for a tradeshow. 16 months later we've never gotten around to "we redo it down the road". It's still serving us very well.

My thoughts:

Pros:

* I love React, so Gatsby was a natural extension for me. It's very helpful to use the same toolchain/mindset in most places.

* I don't have to learn/forget/relearn all of the stupid bugs in Wordpress/Drupal/etc. Gatsby has some shortcomings, but in general if you've worked with React, you already know where the shortcomings and limitations are.

Cons:

* Deployment isn't terribly straight forward if you have a custom use case. I ended up manually building and serving with a small node script.

* It can be very, very (too easy) to accidentally share a server side ENV variable into the JS build. You have to be very careful not to leak an important key.

nkristoffersen 7 years ago

I look forward to migrating to 2.0. I use GatsbyJS 1 for many websites. One website I regenerate every morning to build over 1600 pages (https://frekvensapp.com). I’m told 2.0 has much better support for large sites.

hemantv 7 years ago

I built https://www.goodlyapp.com using Gatsby the performance has been amazing.

The best things is using data at build time rather than run time. Which make everything so fast for the end user.

kornish 7 years ago

Congrats on the release! Looks great.

Looks like Gatsby has raised a ~4m seed. I'm curious: how does Gatsby (the company) make/plan to make revenue from Gatsby (the library)? Support, hosting, or something else?

m0meni 7 years ago

Writing sites with Gatsby is amazing, but is there any way to opt out of JS/PWA completely? It'd be nice to have a setting where Gatsby just called ReactDomServer.renderToStaticMarkup.

chimen 7 years ago

My project (https://qards.io) was #2 on ProductHunt last Saturday and I can say I have some knowledge of Gatsby. The community is very, very vibrant and I'm surprised with the number of plugins they have.

The maintainers are very active and responsive and the project itself does many things...just right.

  • moeamaya 7 years ago

    Somehow missed this and I’m a big PH user, but you’ve built an awesome product!

    Love the simplicity and way you’ve refined the marketing around your app.

syrusakbary 7 years ago

Congrats Kyle & team! So good to see your company moving forward and getting shaped into a great product.

http://Graphene-Python.org/ is still using Gatsby after 2 years from the first release, keep up the good work! :)

Torminguar 7 years ago

The optimizations Gatsby does by default are great, especially if you're a web performance noob. But, I feel like Gatsby and static website generators in general are the product of front-end developers learning to code Javascript with no knowledge of HTML or the underlying technologies.

Nothing wrong with having a chance to make a website with your favorite front-end framework, but when you've been doing web apps with Javascript and websites with only a CSS framework if any, these generators just feel like a bit too much. Not everything needs to be an "app", if you catch my drift.

If you want to make a website that's blazing fast and you happen to know React well, Gatsby really is your best bet.

tekmaven 7 years ago

This should be the recommended starter for React developers, over create-react-app!

bgdkbtv 7 years ago

Congrats! Going to use Gatsby V2 to convert a WP website to headless WP with ACF and static Gatsby on frontend.

Reason why WP is because its still the best editing experience and very simple of anyone to get started with.

deltron3030 7 years ago

How viable is the enhancement of Gatsby with client side interactive stuff (maybe with Create React App widgets) on a Gatsby site?

I'm currently reasearching different workflows and tools where you can transition from a landing page to a saas without changing the dev environment that much.

The closest thing I've found is in the Laravel/Vue ecosystem, where you can start with a static site generator (Jigsaw), and progress into a full Laravel application from there, as it uses the same stuff under the hood minus the backend.

kirankn 7 years ago

Looking at moving a fairly large site to Gatsby. Hoping v2 improvements will help us.

pixelHD 7 years ago

Just finished publishing my blog using gatsby 1.8! Congratulations and great job!

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection