Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add glossary for SSG #35511

Merged
merged 7 commits into from
Sep 1, 2024
Merged

Add glossary for SSG #35511

merged 7 commits into from
Sep 1, 2024

Conversation

Josh-Cena
Copy link
Member

Fixes #34867

@Josh-Cena Josh-Cena requested a review from a team as a code owner August 19, 2024 17:46
@Josh-Cena Josh-Cena requested review from pepelsbey and bsmth and removed request for a team and pepelsbey August 19, 2024 17:46
@github-actions github-actions bot added Content:Glossary Glossary entries size/s [PR only] 6-50 LoC changed labels Aug 19, 2024
Copy link
Contributor

github-actions bot commented Aug 19, 2024

Preview URLs

External URLs (14)

URL: /en-US/docs/Glossary/SSG
Title: Static site generator (SSG)


URL: /en-US/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/Introduction
Title: Introduction to client-side frameworks

(comment last updated: 2024-09-01 23:09:57)


{{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, and most importantly does not have [server-side logic](/en-US/docs/Learn/Server-side), so for any given URL, all users will receive the same content. The developer writes pages in any form accepted by the generator, such as [React](/en-US/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_getting_started), Markdown, or HTML templates, and the generator compiles them into a set of optimized static files that can be rendered by the browser.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fly by comment - this is true, but I don't love the use of the word "developers" here. Most of the time you have a developer who creates an SSG with some form of template framework, you then have authors that create content written in markdown, resTructured text, or some other markup format. As you say, the generator builds this into optimized static files that can be served from a CDN.

As an aside, there is an exception that breaks the rule here, and perhaps it is because this is not "technically an SSG? I'm thinking of docsify since that dynamically loads and renders markdown at runtime.

But if a rample

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mmmm, I think you are right that typically people who create content in SSGs are not the same as those people who maintain the site. As maintainer of Docusaurus I mainly interact with the latter, so I assumed "user of SSG === developer".

Docsify still statically generates HTML and JS, except the Markdown is basically loaded as asset that's rendered client-side. It still doesn't require a server. I think that would be a technical detail.

Suggested change
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, and most importantly does not have [server-side logic](/en-US/docs/Learn/Server-side), so for any given URL, all users will receive the same content. The developer writes pages in any form accepted by the generator, such as [React](/en-US/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_getting_started), Markdown, or HTML templates, and the generator compiles them into a set of optimized static files that can be rendered by the browser.
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, and most importantly does not have [server-side logic](/en-US/docs/Learn/Server-side), so for any given URL, all users will receive the same content. The author writes pages in any form accepted by the generator, such as [React](/en-US/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_getting_started), Markdown, or HTML templates, and the generator compiles them into a set of optimized static files that can be rendered by the browser.

Copy link
Collaborator

@hamishwillee hamishwillee Aug 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That change works for me, though I'd chop that second sentence a bit if possible. Also make it clear that react etc are far less likely to be used.

Suggested change
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, and most importantly does not have [server-side logic](/en-US/docs/Learn/Server-side), so for any given URL, all users will receive the same content. The developer writes pages in any form accepted by the generator, such as [React](/en-US/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_getting_started), Markdown, or HTML templates, and the generator compiles them into a set of optimized static files that can be rendered by the browser.
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 SSG 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 markdown, reStructuredText (and sometimes even HTML, [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.

Docsify still statically generates HTML and JS, except the Markdown is basically loaded as asset that's rendered client-side. It still doesn't require a server. I think that would be a technical detail.

It's certainly a detail that we don't need to argue here :-)

@github-actions github-actions bot added the Content:Learn:Client-side Content under “Client-side JavaScript frameworks” (Svelte, React, Angular, Vue) and related subtrees label Aug 19, 2024
@estelle
Copy link
Member

estelle commented Aug 28, 2024

Fly by the comment: should we call this page "static site generator" instead of "SSG"?
I would have looked up the former, not the latter. I think most of our readers who want to know what a static site generator is would too (and could still find it via SSG)

@Josh-Cena
Copy link
Member Author

@estelle Most glossary entries I've seen use the abbreviation as the title. I assume one of the original intents of the glossary was to search for abbreviations and see what they mean.


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'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/). 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.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another fly-bye - "handful"? There are billions. The best of course is Sphinx, which doesn't even get a mention [let the flame war begin]

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙄

@hamishwillee
Copy link
Collaborator

@estelle Most glossary entries I've seen use the abbreviation as the title. I assume one of the original intents of the glossary was to search for abbreviations and see what they mean.

Why not "Static Site Generator (SSG)"?

Your assumption is reasonable, but both forms might well not be understood.

Copy link
Collaborator

@hamishwillee hamishwillee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me thanks. I'm sure there will be many more opinions on this topic, but they can iterate.

@hamishwillee hamishwillee merged commit 1603e79 into mdn:main Sep 1, 2024
8 checks passed
@Josh-Cena Josh-Cena deleted the ssg branch September 1, 2024 23:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:Glossary Glossary entries Content:Learn:Client-side Content under “Client-side JavaScript frameworks” (Svelte, React, Angular, Vue) and related subtrees size/s [PR only] 6-50 LoC changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Glossary] Static site generator (SSG)
3 participants