惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Martin Fowler
Martin Fowler
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
博客园 - 聂微东
IT之家
IT之家
GbyAI
GbyAI
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Y
Y Combinator Blog
博客园 - 【当耐特】
The Cloudflare Blog
宝玉的分享
宝玉的分享
罗磊的独立博客
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
V
Visual Studio Blog
小众软件
小众软件
博客园_首页
Last Week in AI
Last Week in AI
J
Java Code Geeks
V
V2EX
雷峰网
雷峰网
Apple Machine Learning Research
Apple Machine Learning Research
阮一峰的网络日志
阮一峰的网络日志
腾讯CDC
博客园 - 司徒正美
Engineering at Meta
Engineering at Meta
The GitHub Blog
The GitHub Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
D
DataBreaches.Net
博客园 - 三生石上(FineUI控件)
MyScale Blog
MyScale Blog
云风的 BLOG
云风的 BLOG
The Register - Security
The Register - Security
M
MIT News - Artificial intelligence
Microsoft Azure Blog
Microsoft Azure Blog
T
The Blog of Author Tim Ferriss
N
Netflix TechBlog - Medium
F
Full Disclosure
B
Blog
H
Help Net Security
C
Check Point Blog
WordPress大学
WordPress大学
人人都是产品经理
人人都是产品经理
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Jina AI
Jina AI
酷 壳 – CoolShell
酷 壳 – CoolShell
Blog — PlanetScale
Blog — PlanetScale
L
LangChain Blog
P
Proofpoint News Feed
D
Docker
Microsoft Security Blog
Microsoft Security Blog

CloudCannon Blog

Building with AI: Git-based vs headless vs traditional CMS CloudCannon + Astro: performance meets powerful content management Introducing the Astro Component Starter Introducing Jetstream — built on the Astro Component Starter Why we switched to the system font stack Redesigning CloudCannon’s docs with Diátaxis, Lume, and Pagefind Make content editing more visual: upgraded Editable Regions How Configuration Mode makes building editing interfaces easy Your hosting just got an upgrade (and a price cut) Custom testing domains for professional branding Keep your content consistent with input validation Managing multilingual content in CloudCannon Simplify team publishing with conflict resolution and domain tools Open Beta: Publishing Conflict Resolution Getting started with CloudCannon and Astro: Bookshop, components, and live editing Welcome to the CloudCannon Community! Omnichannel delivery is just marketing spin from API-based CMS companies Getting started with CloudCannon and Astro: Snippets and Collections Managing digital assets in CloudCannon: a guide to smart asset storage Understanding CloudCannon's branching workflows and Projects: a complete guide What is a static website? CloudCannon’s 2024 wrapped Getting started with CloudCannon and Astro: WYSIWYG blogging Jamstack vs. WordPress: reasons to make the change The top five static site generators for 2025 (and when to use them!) Free Jekyll themes for 2025: ten great community options Eleventy (11ty) vs. Hugo How to set up WYSIWYG editing with MkDocs Material The rise of static-first websites: why major brands are making the switch Watching your Core Web Vitals on Jamstack Understanding the difference between static, dynamic, and hybrid websites Looking for an alternative to Netlify CMS or Decap CMS? Designing components for your website editors: a CloudCannon case study Does my website look big in this? Six tips to lower your page weight Content is sacred — so own your revision history The eternal balancing act: load time vs. delay time Streamlined Headless Mode, Unified Configuration, and live data editing What is a headless CMS? Looking for a TinaCMS or Tina Cloud alternative? The ultimate guide to Hugo Sections Coming soon: Live config editing and data reloading Faster publishing workflows out now! Why information architecture matters for your website Website UX vs SEO: picking your battles Easily manage your multilingual Astro site in CloudCannon How you can optimize publishing workflows for your content team How you can optimize your CMS for SEO success How you can optimize your Content Editor for long-form articles How you can optimize your Visual Editor for page building Secure, swift, and stable: static sites for the financial sector Enhanced flexibility for teams with Custom Permissions Building static sites that scale The Inaugural 11ty International Symposium on Making Web Sites Real Good How to manage hundreds of connected websites with a Git-based headless CMS How we’re building CloudCannon for accessibility CloudCannon’s new editing improvements are here! Open Beta | New ways to collaborate on editing your websites Top 11 free Eleventy themes for 2024 Top 10 free Astro themes to use in 2024 Why choose a Git-based headless CMS over a monolithic DXP in 2024? Learning web development: a self-guided roadmap Partner Site of the Month: Blüthner Piano Centre, by Winteractive CloudCannon’s 2023 wrapup Let’s create a microblog with visual editing using Bookshop and Eleventy Update and visualize your branches with CloudCannon Projects What is a Git-based CMS and why you should use one CloudCannon secures SOC 2 certification The complete guide to growing your web development agency Automatically optimize your images with Eleventy Image and CloudCannon Share components and syndicate content with Site Mounting Partner Site of the Month: Cru Uncorked, by Ed Meehan New web component for responsive HTML tables Wrapping up HugoConf 2023 Partner Site of the Month: Van Dillen Antieke Bouwmaterialen, by Fulldev How to become a freelance web developer: a comprehensive guide Q3 2023: CloudCannon features and improvements 22 ways to deliver more value to your web development clients Partner Site of the Month: DC Gay Flag Football League, by Ed Cupaioli A new way to configure your CloudCannon sites CloudCannon — the official CMS partner of Eleventy Full CloudCannon support for Nuxt static sites Partner Site of the Month: Stadium Bike, by Insight Creative, Inc. HugoConf 2023, brought to you by CloudCannon DAM Support for Cloudflare R2 and DigitalOcean Spaces Eleventy (11ty) vs. Gatsby in 2023 – which SSG is best for you? How CloudCannon’s live editing works with Astro and Bookshop Partner Site of the Month: Fiducian, by Croissant & Baguette Eleventy (11ty) vs. Astro How to customize CloudCannon’s Client Sharing interface Let anyone, anywhere, edit your CloudCannon sites Top 23 free Astro themes for building out-of-this-world static sites in 2023 How Jampack optimizes our Eleventy website and improves performance Astro vs. Next.js CloudCannon.com is now built with Eleventy! Out-of-this-world support for all Astro users Introducing the CloudCannon Partner Program Full CloudCannon support for Gatsby Top 10 Free SvelteKit Themes for Building Lighting-Fast Static Sites in 2023 Enhanced CloudCannon support for Next.js users Upcoming CloudCannon Interface improvements (Open Beta)
What is a Static Site Generator?
2022-09-01 · via CloudCannon Blog

So you’ve decided you’d like a static website. Great news! Let’s dig into the tools we use to create static websites, why we use them, and how they fit into our workflows for publishing new content, creating new pages, and keeping our content up to date.

A static site generator (SSG) is a software tool that generates a modern static website from a range of source files. Developers use static site generators to create websites which are fast, secure, scalable, and easy to maintain. And even better, SSGs themselves are open-source software, meaning they’re freely available for everyone to use and modify. Popular SSGs have large and active communities built up around them, with a constant stream of improvements and updates supplied by community members.

Why use a static site generator? Direct link to this section

Static site generators blend the benefits of static websites (simplicity, speed, security, and scalability) with a dynamic approach (code reuse and maintenance) to get the best of both worlds.

They are typically simple to learn and give the developer complete control over the tech stack without adding extra burden and complexity.

Without an SSG, a purely static website would be a nightmare to maintain. Let’s say you want to add an item to the navigation on your site — you’d have to make that same change manually on every single page of your website.

With an SSG, you can make that navigation change in just one place. The SSG will then rebuild the site and your change will be reflected across the entire site.

Static site generators make working with static websites viable for even the most expansive websites.

How does a static site generator work? Direct link to this section

A website made with a static site generator mainly consists of two types of files: layouts and content.

Layouts describe the overall structure and appearance of the website. Think of all the parts of a website that don’t really change between pages — the navigation (site menu), footer, and sidebar are all part of a site’s layout.

Content is simply that — the contents of the site. With the exception of assets like images and icons, most content files are text-based. These text files represent a single page on the website, and don’t contain any information about how they will be presented on the website — that’s the job of the layout.

When a developer runs an SSG tool on the website folder, it starts a ‘build’. During a build the SSG looks at a content file, processes the layout and content with additional assets like images, and outputs an HTML file that any web browser is able to understand. It continues doing this for every content file, at which point the build is complete and the SSG has created a folder with a purely static website in it.

This static website can then be uploaded to almost any hosting service to make it live on the internet.

If the developer makes a change to the website, the build process will start again, looking at every single file and recreating the entire static website, complete with the new changes.

How do you choose an SSG? Direct link to this section

There’s a huge range of static site generators available all with various pros and cons. It can be a daunting task for a developer to select one.

The choice is typically in the developer's hands and comes down to a couple of factors:

  1. What’s the use case? Is it a more informational website or more of an application with authentication and interaction?
  2. What is the developer’s preference in terms of programming language and frameworks?

Let’s take a high-level look at the most popular SSGs to get an idea of the differences between them:

Hugo Direct link to this section

Hugo is a popular choice for developers. It’s been around since 2012 and has an enthusiastic community behind it. Where Hugo really shines is building informational websites like marketing websites, blogs, documentation sites, or portfolios.

As websites get larger, their ‘build time’ (the amount of time it takes to generate a static site from the source files) can get excruciatingly long. Whenever a change is made, the site needs to rebuild, so long build times can be frustrating to the developer. Hugo is known for extremely fast build times so it’s a good choice for large (100k+ pages) websites.

Jekyll Direct link to this section

Jekyll was the first SSG to become widely known and used by developers. It’s simple to learn, flexible enough to handle a variety of use cases, and has a wide ecosystem of plugins and themes. Jekyll has many similarities to Hugo and is well suited to the same informational websites.

Eleventy Direct link to this section

In many ways, Eleventy is a spiritual successor to Jekyll. It shares many of the same conventions and setups, and expands on Jekyll’s goals. The build times are significantly faster than Jekyll (though not as fast as Hugo), and it has a vibrant and active community which continues to build and improve the SSG. Just like Hugo and Jekyll, it’s a great choice for informational websites.

Gatsby.js Direct link to this section

You may have heard of the popular JavaScript framework called React. Many frontend developers are fanatical about React, particularly when it comes to developing interactive components (like a calendar, calculator, or a slideshow) on a page.

Gatsby.js is an SSG built on top of the React framework. It’s a great choice for building websites that have a little bit more functionality and interaction than an informational website. It particularly excels in websites that pull data from many different locations. For example, you might pull product data from Shopify, payment processing from Stripe, search from Algolia, and content from text files. Gatsby.js can combine all of these sources and make them easy to interact with.

Next.js Direct link to this section

Next.js is the most widely used tool on this list. It’s also built on the React framework and is a great choice for building application websites. Think of a movie streaming website, a real estate website, or an ecommerce store — something that is more dynamic and configurable for the person viewing the website.

Nuxt.js Direct link to this section

Like Next.js, Nuxt.js thrives on application websites. The key difference is that Nuxt.js is built on a different JavaScript framework, named Vue.js. Because Next.js and Nuxt.js have similar approaches and use cases but different frameworks, choosing between these two SSGs is mostly a question of developer preference.

What types of websites are static site generators used for? Direct link to this section

Static site generators are used for a huge range of website use cases, from marketing to blogging, documentation, ecommerce, and single-page applications, as well as sites that occupy the middle ground between static and dynamic.

Here are some of the most common use cases for static site generators, as well as our recommendations for which SSG might be suitable for each. You might find it helpful to first ask yourself where your site sits on a sliding scale between ‘Information’ and ‘Application’.

Marketing sites and landing pages Direct link to this section

SSGs are a great choice for marketing websites because the websites load extremely fast and scale well, even under high traffic volumes. Static sites are also easy for search engines like Google to index, and their fast load speeds result in higher search ranking. If you’d like to offer more interactivity, you can add JavaScript to include user-triggered behaviors to your website.

We recommend: Hugo, Jekyll, Eleventy, Gatsby.js.

Blogs Direct link to this section

For blogging-centric sites, any SSG will likely do well. Many other types of websites will feature a product or development blog as well as their landing pages, so you’ll often see static sites featuring blogs alongside other content.

We recommend: Hugo, Jekyll, Eleventy (though all major SSGs handle blogging with ease).

Documentation sites Direct link to this section

Documentation sites can get massive, particularly if they support a large or growing product family. For this reason we’d suggest an SSG with a low build time, such as Hugo or Eleventy.

We recommend: Hugo, Jekyll, Eleventy.

Ecommerce sites Direct link to this section

Ecommerce is a wide spectrum, and SSGs can support everything from simple shop to a fully personalized experience. Payment gateways and shopping cart services such as SnipCart can easily integrate with static sites, and from simple online storefronts to more interactive components, there’s a range of SSGs to support most ecommerce goals. And as with marketing sites above, you can add layers of interactivity with JavaScript.

We recommend: Hugo, Jekyll, Eleventy (for simple ecommerce sites); or Gatsby.js, Next.js, Nuxt.js (for more complex or interactive ecommerce sites).

Applications Direct link to this section

We’re heading in a much more ‘dynamic-ish’ direction here, but there’s a lot of scope for SSGs to help move desktop applications to the browser. Hybrid frameworks allow developers to choose which sections of a website can be static and which can be dynamic, so they’re great for more complex projects — or those that will become more complex with time.

We recommend: Gatsby.js, Next.js, Nuxt.js.

If you have a use case that isn’t covered here, don’t worry! There are hundreds of reliable SSGs available to choose from, built with a wide range of languages and with an even wider range of uses in mind. At their core, though, all SSGs have the same goal — to create static HTML pages as efficiently as possible.

How do I bring an existing site to a static site generator? Direct link to this section

There are a number of reliable methods to bring an existing site to a static site generator. All will include some level of customization, depending on the styling and theme you want to replicate in an SSG, but at the most basic level, you’re looking at three main steps.

  1. Extract your existing site’s content and data. Depending on your current site setup, this might be as straightforward as copying a folder of built site files, or might require writing a migration script for your database or RSS feed.
  2. Transform your content. Once you have your content, the next step is transforming it into formats like Markdown, which your SSG will able to read and process. There are a range of developer tools available to do this; some WordPress plugins even automate the process entirely, if you’re migrating from that platform.
  3. Create your site layouts. Your developer may want to bring over the majority of your existing layouts, components, and styling, or they may want to build them again from scratch. There are different tradeoffs to be made with each approach, so it really comes down to your individual situation. This step is where SSG documentation comes in particularly handy. CloudCannon also has helpful guides available for all the SSGs we support.

How do I edit a website made with a static site generator? Direct link to this section

Using a modern static site generator is a straightforward process. Developers will often use static site generators through a command-line interface, or CLI. For most users, however, a content management system (CMS) simplifies the process of editing content, creating pages, and adding new assets — in short, anything you would expect to do on a website.

Using a CMS, editing content files for a static site generator is as easy as writing and styling your copy in a rich text editor — or on the webpage itself. Users can also create new pages from components (blocks of content), and upload new assets that your SSG will use to build your pages.

If you’ve used Squarespace or WordPress before, you’ll find the combination of a static site generator and the right CMS will be just as straightforward to learn and use. Once you’ve finished editing your content, or building new pages, you simply save your changes in the CMS, and the SSG will rebuild your site.

Find the SSG and CMS that work best for you and your team Direct link to this section

You’ll now be familiar with how static site generators work, and the kinds of sites they’re most useful for. But will you have to alter your workflows to fit into the way an SSG creates websites? Not at all.

With a CMS like CloudCannon, you and your developers can fine tune your SSG’s editing and content creation processes to integrate with the ways you and your team prefer to work. That’s the value of a CMS that is tightly integrated with the ways that SSGs work — your editing and development workflows can be as flexible as you need them to be.