---
title: "build_site"
---

[< Back to Reference](../reference.qmd) | [View source](https://usrbinr.codeberg.page/qrtdown//src/branch/main/R/build.R#L37)

# `build_site()`

Build Package Documentation Site

## Usage

```r
build_site(
  pkg = ".",
  examples = TRUE,
  lazy = FALSE,
  clean = FALSE,
  quiet = FALSE
)
```

## Arguments

| Argument | Description |
|----------|-------------|
| `pkg` | Path to the package root directory |
| `examples` | Whether to run code examples (default TRUE) |
| `lazy` | Only rebuild files that have changed (default FALSE) |
| `clean` | Run `clean_site()` before building to remove all generated files and caches (default FALSE). Useful when builds fail due to stale cache or when you want a completely fresh build. |
| `quiet` | Suppress progress messages (default FALSE) |

## Value

Invisibly returns the path to the built site

## Description

Main functions for building a complete documentation website using Quarto.
Build the complete documentation site

Orchestrates building all components of the documentation site:
index page, function reference, articles from vignettes, news, and citation.

## Examples

```r
## Not run: 
# Build site for current package
build_site()

# Build lazily (only changed files)
build_site(lazy = TRUE)

# Clean build (removes all caches first)
build_site(clean = TRUE)

# Preview after building (use quarto directly)
build_site()
quarto::quarto_preview()

## End(Not run)
```

