## GreatDocs.build()


Build the documentation site.


Usage

``` python
GreatDocs.build(
    watch=False, refresh=True, version_tags=None, latest_only=False
)
```


Generates API reference pages followed by `quarto render`. By default, re-discovers package exports and updates the API reference configuration before building.

> **Note: Note**
>
> In practice, you would normally use the `great-docs build` CLI command rather than calling this method directly. See the [CLI reference](cli/build.md) for details.


## Parameters


`watch: bool = ``False`  
If `True`, watch for changes and rebuild automatically.

`refresh: bool = ``True`  
If `True` (default), re-discover package exports and update API reference config before building. Set to False for faster rebuilds when your package API hasn't changed.

`version_tags: list[str] | None = None`  
If provided, only build these specific version tags (for multi-version sites). Ignored when no `versions:` config is present.

`latest_only: bool = ``False`  
If `True`, build only the latest version (skip historical versions). Ignored when no `versions:` config is present.


## Examples

Build the documentation (with API refresh):

``` python
from great_docs import GreatDocs

docs = GreatDocs()
docs.build()
```

Build with watch mode:

``` python
docs.build(watch=True)
```

Quick rebuild without API refresh:

``` python
docs.build(refresh=False)
```
