# Build Docs

Task-oriented recipes. Each section assumes you already have `splam` installed and running. See the [Tutorial](tutorial-getting-started.md) if not.


# Rebuild and preview the documentation site

``` bash
great-docs build
great-docs preview --port 4173
```

`great-docs build` regenerates `great-docs/_site/` from `README.md`, `user_guide/*.qmd`, and the package's docstrings. `great-docs preview` serves that directory locally.


# Add a screenshot to the docs

Drop image files into `user_guide/images/` and reference them from a `.qmd` file with a path relative to `user_guide/` (no `../`), e.g.:

``` markdown
![](images/ui-login.png){width='100%'}
```

`great-docs build` auto-copies any asset directory (one with no `.qmd` files, e.g. `images/`) that lives directly inside `user_guide/` into the built site. A project-root `images/` folder (a sibling of `user_guide/`) is **not** picked up. It must be inside `user_guide/`.
