# SiteGenerator

**Kind:** Class

**Source:** [`atloria-monorepo/apps/cli/src/generators/site.generator.ts`](https://github.com/sherkety/atloria/blob/main/atloria-monorepo/apps/cli/src/generators/site.generator.ts#L54)

Static Site Generator

## Methods

| Method | Signature | Returns |
|---|---|---|
| `generate` | `generate(metadata: ProjectMetadata, entities: Entity[], relationships: Relationship[])` | `Promise<void>` |

## Where it refuses work

- `SiteGenerator` stops the work with an early return when `!fs.existsSync(uiCoreBundlePath)`.
- `SiteGenerator` stops the work with an early return when `hasChildren`.
- `SiteGenerator` stops the work with an early return when `!filePath || !fs.existsSync(filePath)`.
- `SiteGenerator` stops the work with an early return when `!str || typeof str !== 'string'`.

## When something fails

- `SiteGenerator` handles failure in 3 places: it discards it silently in 2, and turns it into a return value in 1.
