gatsbyjs / gatsby

The best React-based framework with performance, scalability and security built in.
https://www.gatsbyjs.com
MIT License
55.28k stars 10.31k forks source link

Gatsby vs Next #519

Closed SachaG closed 6 years ago

SachaG commented 8 years ago

I would love to see a comparison between Gatsby and Next.js, which is a project with similar goals but a different approach. Maybe something like this?

KyleAMathews commented 8 years ago

Yeah, that'd be useful for the website. Both projects definitely have very similar goals and ways of doing things. It seems like a lot of projects are converging on similar ideas.

From my quick looks around the main differences seem to be:

dbismut commented 8 years ago

Am I wrong or Next.js doesn't support static site generation? https://github.com/zeit/next.js/issues/70

For me that's a huge bonus of Gatsby. But I guess that's what you meant by dynamic vs static rendering.

erlend-sh commented 7 years ago

Am I totally off on my understanding of next.js here, or could that framework basically be used to provide an alternative content server for Gatsby, similar to how you'd use Contentful or DatoCMS?

On a different note, @MoOx' Phenomic would probably be a good fit for such a comparison as well.

SachaG commented 7 years ago

@erlend-sh I don't really think Next.js can be used for that, my understanding is that it would serve HTML markup, not raw JSON data. I might be wrong though.

dbismut commented 7 years ago

My understanding is that DatoCMS, as a static site CMS, would be a perfect fit for Gatsby. I imagine that would require some work with DatoCMS so that Gatsby is part of their supported generators?

Since Next.js has dynamic server rendering, Contentful or Prismic would be ideal so that the content fetched from their API is served with the HTML generated by Next.js.

@erlend-sh Indeed it looks like Phenomic is a direct alternative to Gatsby.

KyleAMathews commented 7 years ago

@dbismut DatoCMS is already working on that!

dbismut commented 7 years ago

Oh wow very cool :)

MoOx commented 7 years ago

FYI, after discussing with now and Next creator (rauchg) at dotJS about next export and static rendering, I am currently trying to help Next.js team to think about a static export feature, so at some point we will be able to generate a static version of a next website. After that I may refactor Phenomic to rely on Next framework.

I guess a direct comparison between Gatsby and Next don't really make sense: it will be clearly easier to make static* a website with Gatsby/Phenomic than with next directly (next will never support markdown out of the box (and things like that) as it's a minimalist framework).

*WE USE REACT SO IT'S DYNAMIC, right?

erlend-sh commented 7 years ago

I am currently trying to help Next.js team to think about a static export feature, so at some point we will be able to generate a static version of a next website. After that I may refactor Phenomic to rely on Next framework.

I just wanna say I think that sounds like a really cool direction for Phenomic! Although I have no right to be, it does always bother me a tiny bit when two projects so conceptually and technologically similar - React-based static site generator - can't find a way to collaborate (that's not to say navigating that type of collaboration is easy!).

But with this change of direction for Phenomic, you'd be making a fundamentally different type of CMS with its own unique feature offering. ❤️ it!

plouc commented 7 years ago

next export available for preview https://zeit.co/blog/next3-preview#next-export

stale[bot] commented 6 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 6 years ago

This issue has been automatically closed due to inactivity.

goldensunliu commented 6 years ago

@dbismut so about https://github.com/gatsbyjs/gatsby/issues/519#issuecomment-257265919, next now support static exports as well!