gatsby, hexo, next, nuxt, and sapper are frameworks designed to build web applications with a focus on performance, SEO, and content delivery. next and nuxt are full-stack frameworks for React and Vue respectively, offering server-side rendering (SSR) and static site generation (SSG). gatsby is a React-based static site generator known for its GraphQL data layer. hexo is a fast, simple static site generator primarily used for blogging. sapper is the predecessor to SvelteKit, designed for Svelte applications with SSR and SSG capabilities, though it is now in maintenance mode.
These five tools solve similar problems โ building fast, SEO-friendly websites โ but they take very different approaches depending on your framework preference and project needs. next and nuxt are full-stack frameworks for React and Vue. gatsby is a static site generator for React. hexo is a lightweight static generator for blogs. sapper is the legacy framework for Svelte. Let's look at how they handle real engineering tasks.
next uses the file system to define routes. In the modern App Router, folders represent segments.
// next: app/page.js
export default function Page() {
return <h1>Home</h1>;
}
// app/about/page.js maps to /about
nuxt also uses file-based routing but auto-imports components.
<!-- nuxt: pages/index.vue -->
<template>
<div>Home</div>
</template>
<!-- pages/about.vue maps to /about -->
gatsby creates pages programmatically or via the file system in src/pages.
// gatsby: src/pages/index.js
import React from "react"
export default function Home() {
return <div>Home</div>
}
hexo generates static HTML based on posts and pages, usually without complex routing logic.
# hexo: _config.yml
permalink: :year/:month/:day/:title/
# Routes are derived from post front-matter
sapper uses a routes folder where .svelte files become routes.
<!-- sapper: routes/index.svelte -->
<h1>Home</h1>
<!-- routes/about.svelte maps to /about -->
next uses server components or fetch inside async components in the App Router.
// next: app/page.js
async function getData() {
const res = await fetch('https://api.example.com/data')
return res.json()
}
export default async function Page() {
const data = await getData()
return <main>{data.title}</main>
}
nuxt provides useFetch or useAsyncData composables.
<!-- nuxt: pages/index.vue -->
<script setup>
const { data } = await useFetch('/api/data')
</script>
<template>
<div>{{ data.title }}</div>
</template>
gatsby relies heavily on GraphQL queries at build time for static data.
// gatsby: src/pages/index.js
import { graphql } from "gatsby"
export const query = graphql`{ site { title } }`
export default function Home({ data }) {
return <div>{data.site.title}</div>
}
hexo loads data from markdown front-matter or config files during generation.
# hexo: source/_posts/hello.md
---
title: Hello World
date: 2023-01-01
---
Content here
sapper uses a preload function or load in newer versions to fetch data.
<!-- sapper: routes/index.svelte -->
<script context="module">
export async function preload() {
const res = await this.fetch('/api/data');
return { data: await res.json() };
}
</script>
next supports Static Site Generation (SSG), Server-Side Rendering (SSR), and Client-Side Rendering (CSR) per route.
// next: Force SSR
export const dynamic = 'force-dynamic'
// Or Static
export const dynamic = 'force-static'
nuxt allows hybrid rendering with Nitro engine, mixing static and server routes.
// nuxt: nuxt.config.ts
export default defineNuxtConfig({
nitro: { prerender: { routes: ['/'] } }
})
gatsby is primarily Static Site Generation, though DSG (Deferred Static Generation) exists.
// gatsby: gatsby-node.js
exports.createPages = async ({ actions }) => {
actions.createPage({ path: "/", component: resolve(`./src/pages/index.js`) })
}
hexo is purely Static Site Generation. All HTML is built before deployment.
# hexo: Command line
clean && generate && deploy
# No server-side logic at runtime
sapper supports SSR and SSG (via sapper export).
# sapper: Package.json
"scripts": {
"export": "sapper export"
}
# Creates a static version of the SSR app
next uses next.config.js for build settings.
// next: next.config.js
module.exports = {
images: { domains: ['example.com'] }
}
nuxt uses nuxt.config.ts for a typed configuration experience.
// nuxt: nuxt.config.ts
export default defineNuxtConfig({
modules: ['@nuxt/content']
})
gatsby uses gatsby-config.js for plugins and site metadata.
// gatsby: gatsby-config.js
module.exports = {
plugins: [`gatsby-plugin-image`]
}
hexo uses _config.yml for theme and site settings.
# hexo: _config.yml
theme: landscape
deploy:
type: git
sapper uses sapper.config.js for build customization.
// sapper: sapper.config.js
export default {
serviceworker: { enabled: true }
}
next, nuxt, and gatsby are actively maintained with frequent releases.
hexo is stable and maintained, suitable for its niche.
sapper is in maintenance mode. The team recommends moving to SvelteKit.
# sapper: Warning on npm install
# npm WARN deprecated sapper@0.29.3: Please migrate to SvelteKit
Despite different frameworks, they share core goals.
All five generate HTML on the server or at build time for crawlers.
<!-- All output standard HTML -->
<h1>Page Title</h1>
<meta name="description" content="..." />
All focus on speed via code splitting and asset optimization.
// next: next/image
// nuxt: nuxt/image
// gatsby: gatsby-image
// All optimize images automatically
Most use the file system to define URLs, reducing boilerplate.
// next, nuxt, gatsby, sapper
/pages/about.js -> /about
| Feature | next | nuxt | gatsby | hexo | sapper |
|---|---|---|---|---|---|
| Framework | React | Vue | React | None (JS) | Svelte |
| Rendering | Hybrid | Hybrid | Static | Static | SSR/Static |
| Data Layer | Fetch/GraphQL | Composables | GraphQL | Front-matter | Fetch |
| Status | Active | Active | Active | Active | Maintenance |
| Best For | Web Apps | Web Apps | Content Sites | Blogs | Legacy Svelte |
next and nuxt are your go-to choices for modern web applications requiring dynamic features and scalability. They handle the heavy lifting of server configuration and rendering strategies.
gatsby remains a strong contender for content sites where the GraphQL data layer simplifies pulling from multiple sources, though build times can be a trade-off.
hexo is the pragmatic choice for simple blogs where you just want to write markdown and deploy without managing a complex build pipeline.
sapper should be avoided for new work. If you love Svelte, use SvelteKit. If you are stuck on sapper, plan a migration path.
Final Thought: Match the tool to your team's framework expertise and the site's complexity. Don't over-engineer a blog with a full-stack app framework, and don't under-engineer a dashboard with a static generator.
Choose gatsby if you are building a content-heavy site like a marketing page or documentation portal that benefits from a unified GraphQL data layer. It is ideal when you need to pull data from multiple sources (CMS, APIs, files) and want a rich plugin ecosystem for image optimization and SEO. However, be aware that build times can grow significantly as the site scales.
Choose hexo if your primary goal is to launch a personal blog or simple documentation site with minimal configuration. It is lightweight and fast, making it perfect for writers who want to focus on content rather than complex application logic. It is not suitable for dynamic web applications requiring user authentication or complex state management.
Choose next if you need a flexible React framework that supports both static generation and server-side rendering with minimal setup. It is the industry standard for production React apps, offering robust features like API routes, image optimization, and a strong ecosystem. It fits well for e-commerce, dashboards, and large-scale web applications.
Choose nuxt if your team prefers Vue.js and needs a framework that handles server-side rendering and static generation out of the box. It provides a modular architecture with auto-imports and a powerful state management story. It is excellent for content sites, e-commerce, and apps that require the reactivity of Vue with the SEO benefits of SSR.
Do NOT choose sapper for new projects as it is in maintenance mode and superseded by SvelteKit. If you are maintaining a legacy Svelte application built with sapper, continue using it until migration is feasible. For any new Svelte project, evaluate SvelteKit instead for active support and modern features.
The future of web development is here.
Gatsby is a free and open source framework based on React that helps developers build blazing fast websites and apps.
It combines the control and scalability of dynamically rendered sites with the speed of static-site generation, creating a whole new web of possibilities.
Gatsby helps professional developers efficiently create maintainable, highly-performant, content-rich websites.
Load Data From Anywhere. Gatsby pulls in data from any data source, whether itโs Markdown files, a headless CMS like Contentful or WordPress, or a REST or GraphQL API. Use source plugins to load your data, then develop using Gatsbyโs uniform GraphQL interface.
Go Beyond Static Websites. Get all the benefits of static websites with none of the limitations. Gatsby sites are fully functional React apps, so you can create high-quality, dynamic web apps, from blogs to e-commerce sites to user dashboards.
Choose your Rendering Options. You can choose alternative rendering options, namely Deferred Static Generation (DSG) and Server-Side Rendering (SSR), in addition to Static Site Generation (SSG) โ on a per-page basis. This type of granular control allows you to optimize for performance and productivity without sacrificing one for the other.
Performance Is Baked In. Ace your performance audits by default. Gatsby automates code splitting, image optimization, inlining critical styles, lazy-loading, prefetching resources, and more to ensure your site is fast โ no manual tuning required.
Use a Modern Stack for Every Site. No matter where the data comes from, Gatsby sites are built using React and GraphQL. Build a uniform workflow for you and your team, regardless of whether the data is coming from the same backend.
Host at Scale for Pennies. Gatsby sites donโt require servers, so you can host your entire site on a CDN for a fraction of the cost of a server-rendered site. Many Gatsby sites can be hosted entirely free on Gatsby Cloud and other similar services.
Use Gatsby's Centralized Data Layer Everywhere. With Gatsby's Valhalla Content Hub you can bring Gatsby's data layer to any project. Making it accessible via a unified GraphQL API for building content sites, eCommerce platforms, and both native and web applications.
Learn how to use Gatsby for your next project.
Click the link below to quickly try the workflow of developing, building, and deploying websites with Gatsby and Gatsby Cloud.
At the end of this process, you'll have
You can get a new Gatsby site up and running on your local dev environment in 5 minutes with these four steps:
Initialize a new project.
npm init gatsby
Give it the name "My Gatsby Site".
Start the site in develop mode.
Next, move into your new siteโs directory and start it up:
cd my-gatsby-site/
npm run develop
Open the source code and start editing!
Your site is now running at http://localhost:8000. Open the my-gatsby-site directory in your code editor of choice and edit src/pages/index.js. Save your changes, and the browser will update in real time!
At this point, youโve got a fully functional Gatsby website. For additional information on how you can customize your Gatsby site, see our plugins and the official tutorial.
Full documentation for Gatsby lives on the website.
For most developers, we recommend starting with our in-depth tutorial for creating a site with Gatsby. It starts with zero assumptions about your level of ability and walks through every step of the process.
To dive straight into code samples head to our documentation. In particular, check out the โHow-to Guidesโ, โReferenceโ, and โConceptual Guidesโ sections in the sidebar.
We welcome suggestions for improving our docs. See the โhow to contributeโ documentation for more details.
Start Learning Gatsby: Follow the Tutorial ยท Read the Docs
Wondering what we've shipped recently? Check out our release notes for key highlights, performance improvements, new features, and notable bugfixes.
Also, read our documentation on version support to understand our plans for each version of Gatsby.
Already have a Gatsby site? These handy guides will help you add the improvements of Gatsby v5 to your site without starting from scratch!
Gatsby is dedicated to building a welcoming, diverse, safe community. We expect everyone participating in the Gatsby community to abide by our Code of Conduct. Please read it. Please follow it. In the Gatsby community, we work hard to build each other up and create amazing things together. ๐ช๐
Whether you're helping us fix bugs, improve the docs, or spread the word, we'd love to have you as part of the Gatsby community!
Check out our Contributing Guide for ideas on contributing and setup steps for getting our repositories up and running on your local machine.
This repository is a monorepo managed using Lerna. This means there are multiple packages managed in this codebase, even though we publish them to NPM as separate packages.
Licensed under the MIT License.
Thanks go out to all our many contributors creating plugins, starters, videos, and blog posts. And a special appreciation for our community members helping with issues and PRs, or answering questions on GitHub Discussions.
A big part of what makes Gatsby great is each and every one of you in the community. Your contributions enrich the Gatsby experience and make it better every day.