Skip to content

Commit

Permalink
Add glossary/static-site-generator entry. (#20824)
Browse files Browse the repository at this point in the history
* docs/glossary: Static Site Generator entry

- Adds a static site generator entry to the glossary page, and a longer article-length definition.
- Updated doc-links.yaml with links to the new content.

* glossary/static-site-generator: Make internal links relative links.

* Update docs/docs/glossary/static-site-generator.md

Add a well-placed comma.

Co-Authored-By: Aisha Blake <aisha@gatsbyjs.com>

* Update docs/docs/glossary/static-site-generator.md

Change link text from "available" to "static site generators available."

Co-Authored-By: Aisha Blake <aisha@gatsbyjs.com>

* Update docs/docs/glossary/static-site-generator.md

Add a comma after "StaticGen" link.

Co-Authored-By: Aisha Blake <aisha@gatsbyjs.com>

* Update docs/docs/glossary/static-site-generator.md

Change URLs to point to internal docs

Co-authored-by: Aisha Blake <aisha.g.blake@gmail.com>
  • Loading branch information
webinista and Aisha Blake authored Jan 31, 2020
1 parent 26e0cbc commit 412eba6
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/docs/glossary.md
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,10 @@ Gatsby [builds](#build) static versions of your page that can be easily [hosted]

It also refers to the `/static` folder which is automatically copied into `/public` on each [build](#build) for files that don't need to be processed by Gatsby but do need to exist in [public](#public).

### [Static Site Generator](/docs/glossary/static-site-generator)

A software application that creates HTML pages from templates or [components](#component) and a given content source.

## T

### Template
Expand Down
35 changes: 35 additions & 0 deletions docs/docs/glossary/static-site-generator.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
title: Static Site Generator
disableTableOfContents: true
---

Learn what a static site generator is and why you might choose a static site generator, such as Gatsby, over other publishing tools.

## What is a Static Site Generator?

A static site generator is a software application that creates HTML pages from templates or components and a given content source. Most static site generators, [including Gatsby](/docs/adding-markdown-pages/), accept [Markdown](https://daringfireball.net/projects/markdown/)-formatted text files as a source, although Gatsby is not limited to Markdown.

Static site generators are an alternative to database-driven content management systems, such as WordPress and Drupal. In such systems, content is managed and stored in a database. When the server receives a request for a particular URL, a software layer retrieves data from the database, merges it with template files, and generates an HTML page as its response.

Static site generators, on the other hand, generate HTML pages during a [build](/docs/glossary/#build) process. Gatsby, for example, loads JSON from [GraphQL](/docs/glossary/graphql), and merges that data with components to create HTML pages. These generated pages are then deployed to a web server. When the server receives a request, it responds with rendered HTML. Static pages eliminate the latency that databases introduce.

> Note: It's also possible to use Gatsby [without GraphQL](/using-gatsby-without-graphql/), using the `createPages` API.
You can also use static site generators to create [JAMStack](/docs/glossary/jamstack.md) sites. JAMStack is a modern web site architecture that uses JavaScript, content APIs, and markup. Gatsby, for example, can use the [WordPress REST API](/sourcing-from-wordpress/) as a data source.

### Advantages of static site generators

Static site generators **reduce site complexity**. That, in turn, improves speed and reliability, and smoothes the developer experience.

- You don't have to worry about database-toppling traffic spikes.
- There's no need to manage database server software or backups.
- You can use version control software to manage and track changes to your content.
- Because your site is static, you can even forgo web servers and load balancers altogether. Instead, you can host your site with a content delivery network that scales with your site's traffic.

There are dozens of static site generators available, created with a range of programming languages. Gatsby is [JavaScript](/glossary#javascript) at its core, and is built with [React](/glossary/react), GraphQL, and [Node.js](/glossary/node/). See how Gatsby [compares to WordPress and Drupal](/features/cms/gatsby-vs-wordpress-vs-drupal) or to popular [static site generators](/features/jamstack/).

### Learn more

- [JAMStack](/docs/glossary/jamstack.md) architecture from the Gatsby docs
- [Sourcing Content and Data](/content-and-data/) for Gatsby
- [Adding Markdown Pages](/docs/adding-markdown-pages/) from the Gatsby docs
2 changes: 2 additions & 0 deletions www/src/data/sidebars/doc-links.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -734,6 +734,8 @@
link: /docs/glossary/node
- title: React
link: /docs/glossary/react
- title: Static Site Generator
link: /docs/glossary/static-site-generator
- title: webpack
link: /docs/glossary/webpack
- title: Gatsby Telemetry
Expand Down

0 comments on commit 412eba6

Please sign in to comment.