Skip to content

Commit

Permalink
Add glossary for SSG (#35511)
Browse files Browse the repository at this point in the history
* Add glossary for SSG

* Update learning

* Update files/en-us/glossary/ssg/index.md

* Update index.md

* Update files/en-us/glossary/ssg/index.md

* K

* Update files/en-us/glossary/ssg/index.md

---------

Co-authored-by: Hamish Willee <[email protected]>
  • Loading branch information
Josh-Cena and hamishwillee authored Sep 1, 2024
1 parent 638277d commit 1603e79
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
22 changes: 22 additions & 0 deletions files/en-us/glossary/ssg/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
title: Static site generator (SSG)
slug: Glossary/SSG
page-type: glossary-definition
---

{{GlossarySidebar}}

A **static site generator** (SSG) is a software used to generate _static_ websites. A static website is comprised of {{glossary("HTML")}}, {{glossary("CSS")}}, and {{glossary("JavaScript")}} files. Most importantly static sites do not have [server-side logic](/en-US/docs/Learn/Server-side), so for any given URL, all users will receive the same content. Authors write content in any form accepted by the generator, such as Markdown, reStructuredText, HTML, (and sometimes even [React](/en-US/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_getting_started), and so on), and the generator compiles them into a set of optimized static files that can be rendered by the browser.

Static sites are commonly used for blogs, documentation, and other content-driven websites, which don't have data that needs to be fetched or generated server-side. They are fast, secure, and easy to deploy, because they can be served from a {{glossary("CDN")}}.

## See also

- [Introduction to client-side frameworks > static site generators](/en-US/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/Introduction#static_site_generators)
- [Static site generator](https://en.wikipedia.org/wiki/Static_site_generator) on Wikipedia
- [Wordpress](https://wordpress.com/)
- [Docusaurus](https://docusaurus.io/)
- [Jekyll](https://jekyllrb.com/)
- [Astro](https://astro.build/)
- [VitePress](https://vitepress.dev/)
- [Eleventy](https://www.11ty.dev/)
Original file line number Diff line number Diff line change
Expand Up @@ -303,11 +303,11 @@ All of the frameworks covered in this module support server-side rendering as we
### Static site generators

Static site generators are programs that dynamically generate all the webpages of a multi-page website — including any relevant CSS or JavaScript — so that they can be published in any number of places. The publishing host could be a GitHub pages branch, a Netlify instance, or any private server of your choosing, for example. There are a number of advantages of this approach, mostly around performance (your user's device isn't building the page with JavaScript; it's already complete) and security (static pages have fewer attack vectors). These sites can still utilize JavaScript where they need to, but they are not _dependent_ upon it. Static site generators take time to learn, just like any other tool, which can be a barrier to your development process.
[Static site generators](/en-US/docs/Glossary/SSG) are programs that dynamically generate all the webpages of a multi-page website — including any relevant CSS or JavaScript — so that they can be published in any number of places. The publishing host could be a GitHub pages branch, a Netlify instance, or any private server of your choosing, for example. There are a number of advantages of this approach, mostly around performance (your user's device isn't building the page with JavaScript; it's already complete) and security (static pages have fewer attack vectors). These sites can still utilize JavaScript where they need to, but they are not _dependent_ upon it. Static site generators take time to learn, just like any other tool, which can be a barrier to your development process.

Static sites can have as few or as many unique pages as you want. Just as frameworks empower you to quickly write client-side JavaScript applications, static site generators allow you a way to quickly create HTML files you would otherwise have written individually. Like frameworks, static site generators allow developers to write components that define common pieces of your web pages, and to compose those components together to create a final page. In the context of static site generators, these components are called **templates**. Web pages built by static site generators can even be home to framework applications: if you want one specific page of your statically-generated website to boot up a React application when your user visits it for example, you can do that.

Static site generators have been around for quite a long time, and they've recently seen a wave of renewed interest and innovation. A handful of powerful options are now available, such as [Astro](https://astro.build/), [Eleventy](https://www.11ty.dev/), [Hugo](https://gohugo.io/), [Jekyll](https://jekyllrb.com/), and [Gatsby](https://www.gatsbyjs.com/).
Static site generators have been around for quite a long time, and they are under constant optimization and innovation. A range of choices exist, including [Astro](https://astro.build/), [Eleventy](https://www.11ty.dev/), [Hugo](https://gohugo.io/), [Jekyll](https://jekyllrb.com/), and [Gatsby](https://www.gatsbyjs.com/), which build on various technology stacks and provide distinctive features. Other options, such as [Docusaurus](https://docusaurus.io/) and [VitePress](https://vitepress.dev/), use client-side frameworks instead of templates, but generate similarly optimized static files.

If you'd like to learn more about static site generators on the whole, check out Tatiana Mac's [Beginner's guide to Eleventy](https://www.tatianamac.com/posts/beginner-eleventy-tutorial-parti/). In the first article of the series, they explain what a static site generator is, and how it relates to other means of publishing web content.

Expand Down

0 comments on commit 1603e79

Please sign in to comment.