# site

> Sites built to a folder: the build, broken links, page weight, and the sitemap.

Sites built to a folder: the build, broken links, page weight, and the sitemap. It requires [`html`](/reference/configurations/html/).

## Checks

| Check                                                         | Stage  | Level         | What it does                                                                                           |
| ------------------------------------------------------------- | ------ | ------------- | ------------------------------------------------------------------------------------------------------ |
| [`site/build`](/reference/checks/site/build/)                 | `push` | `recommended` | Runs `site.build_command`, and fails on an error or a missing output folder.                           |
| [`site/html-validate`](/reference/checks/site/html-validate/) | `push` | `recommended` | Validates every built page with html-validate.                                                         |
| [`site/purgecss`](/reference/checks/site/purgecss/)           | `push` | `recommended` | Finds selectors in the built stylesheets that no page or script uses.                                  |
| [`site/linkinator`](/reference/checks/site/linkinator/)       | `push` | `recommended` | Serves the built site and follows every link between its pages, stylesheets, and fragments.            |
| [`site/size`](/reference/checks/site/size/)                   | `push` | `recommended` | Sums the compressed weight of the built paths each ceiling in site.size\_limit names.                  |
| [`site/sitemap`](/reference/checks/site/sitemap/)             | `push` | `recommended` | Compares the sitemap with the built pages, and reports a listed route with no page or a page left out. |
| [`site/unused-assets`](/reference/checks/site/unused-assets/) | `push` | `all`         | Finds files under an assets folder that no page, stylesheet, or script names.                          |

## Settings

| Setting                                                                             | What it sets                                                                                      |
| ----------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
| [`site.build_command`](/reference/gspot-toml/#site.build_command)                   | The command that builds the site. Without it, gspot runs the build script of the package manager. |
| [`site.build_folder`](/reference/gspot-toml/#site.build_folder)                     | The folder the build writes.                                                                      |
| [`site.allowed_unlisted_pages`](/reference/gspot-toml/#site.allowed_unlisted_pages) | Built pages the sitemap leaves out on purpose.                                                    |
| [`site.size_limit`](/reference/gspot-toml/#sitesize_limit)                          | Size limits: the built paths, and the most kilobytes they may weigh compressed.                   |
| [`tools.purgecss.safelist`](/reference/gspot-toml/#tools.purgecss.safelist)         | Class names a script adds at run time: the names and the reason.                                  |

## Selected when

gspot selects it in a scope with file paths `site.webmanifest`, `sitemap.xml`.

## Rules for coding agents

| Rule file                                            | Installed when |
| ---------------------------------------------------- | -------------- |
| `.gspot/configurations/framework/site/rules/SITE.md` | Always         |

## Tools and versions

| Tool       | Version |
| ---------- | ------- |
| linkinator | `8.1.0` |
| purgecss   | `7.0.2` |

## Files gspot writes

gspot writes `.gspot/configurations/framework/site/html-validate.json` and `.gspot/configurations/framework/site/purgecss.mjs`.
