## Documentation index

This index lists every available documentation page and its Markdown source.

- [Documentation](https://veta.varavel.com/docs/index.md)
  - [Getting Started](https://veta.varavel.com/docs/getting-started/index.md)
  - [Installation](https://veta.varavel.com/docs/installation/index.md)
  - [Guides](https://veta.varavel.com/docs/guides/index.md)
    - [Project Structure](https://veta.varavel.com/docs/guides/project-structure/index.md)
    - [Configuration](https://veta.varavel.com/docs/guides/configuration/index.md)
    - [Pages](https://veta.varavel.com/docs/guides/pages/index.md)
    - [Data](https://veta.varavel.com/docs/guides/data/index.md)
    - [Markdown](https://veta.varavel.com/docs/guides/markdown/index.md)
    - [Templates](https://veta.varavel.com/docs/guides/templates/index.md)
    - [Components](https://veta.varavel.com/docs/guides/components/index.md)
    - [Filters](https://veta.varavel.com/docs/guides/filters/index.md)
    - [Assets And Tailwind CSS](https://veta.varavel.com/docs/guides/assets-and-tailwind/index.md)
    - [Themes](https://veta.varavel.com/docs/guides/themes/index.md)
    - [Development Server](https://veta.varavel.com/docs/guides/development-server/index.md)
    - [Build And Output](https://veta.varavel.com/docs/guides/build-and-output/index.md)
    - [Deployment](https://veta.varavel.com/docs/guides/deployment/index.md)
  - [Reference](https://veta.varavel.com/docs/reference/index.md)
    - [CLI Reference](https://veta.varavel.com/docs/reference/cli/index.md)
    - [Config Reference](https://veta.varavel.com/docs/reference/config/index.md)
    - [Page Generators Reference](https://veta.varavel.com/docs/reference/page-generators/index.md)
    - [Template Context Reference](https://veta.varavel.com/docs/reference/template-context/index.md)
    - [Troubleshooting](https://veta.varavel.com/docs/reference/troubleshooting/index.md)
  - [API](https://veta.varavel.com/docs/api/index.md)
    - [JavaScript API](https://veta.varavel.com/docs/api/javascript/index.md)
    - [File API](https://veta.varavel.com/docs/api/files/index.md)
    - [HTTP Client](https://veta.varavel.com/docs/api/http-client/index.md)
    - [Parse API](https://veta.varavel.com/docs/api/parse/index.md)
    - [Template Functions](https://veta.varavel.com/docs/api/template-functions/index.md)
    - [Environment And Console](https://veta.varavel.com/docs/api/environment-and-console/index.md)
    - [Markdown Frontmatter](https://veta.varavel.com/docs/api/frontmatter/index.md)


## Documentation content

The documentation for the current page follows, reproduced verbatim.


# Development Server

`veta dev` starts a local development server with live reload.

```sh
veta dev
```

By default, it serves at:

```txt
http://127.0.0.1:3000/
```

## Config

Configure the server in `veta.yaml`:

```yaml
dev:
  host: 127.0.0.1
  port: 3000
  watch:
    - content
```

`host` changes the address Veta binds to.

`port` changes the port.

`watch` adds project-relative files or directories to the watcher. Directories are watched recursively.

The only `veta dev` CLI flag is `--config`, which works like `veta build --config`:

```sh
veta dev --config path/to/veta.yaml
```

## Temporary Output

The dev server does not write to `build.output`. Instead, it creates an OS temporary directory, builds the site there, serves that directory, and removes it on shutdown.

This means running `veta dev` will not create or modify `dist/`.

## Rebuilds

On startup, Veta performs a full build. When relevant project files change, it performs another full clean rebuild into the temporary directory.

Veta watches:

```txt
veta.yaml
veta.yml
.veta.yaml
.veta.yml
pages/
data/
templates/
components/
filters/
functions/
public/
```

It also watches every path configured in `dev.watch`.

The watcher is intentionally simple and predictable. It rebuilds the whole site rather than trying to cache partial work.

Changes to `dev.host`, `dev.port`, or `dev.watch` require restarting `veta dev`, because those values define the running server and watcher.

## Live Reload

Veta uses Server-Sent Events at:

```txt
/_veta/live
```

When serving generated `.html` files, the dev server injects a small live reload script into the HTTP response. The script is not written to disk and never appears in production builds.

## Not A Production Server

`veta dev` is for local development only. For production, run:

```sh
veta build
```

Then deploy the output directory to a static hosting provider.
