## 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.


# Project Structure

A Veta project is a folder with a `veta.yaml` configuration file and optional feature directories. The starter project created by `veta init` shows the common layout:

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

Only `veta.yaml` and `pages/` are necessary for most useful sites. The other directories are optional and can be introduced as the project grows.

## `veta.yaml`

`veta.yaml` configures Veta itself. It controls build output, clean mode, generated HTML minification, Tailwind CSS, and themes.

Site content does not belong in `veta.yaml`. Put content, navigation, SEO metadata, and theme data in `data/` or content files read through the JavaScript file API.

## `pages/`

`pages/` contains flat JavaScript page generator files. Each file must end in `.js` and export a default function that returns an array of page objects.

The directory is intentionally flat. Do not put nested folders under `pages/`.

## `templates/`

`templates/` contains Pongo page templates and any supporting template files. A page object references templates relative to this directory:

```js
{
  permalink: "/",
  template: "base",
}
```

That can resolve `templates/base.html`, `templates/base.j2`, or another non-ignored file with the same stem.

Templates can include other files or import exported macros through normal Pongo tags. Veta does not prescribe subdirectories inside `templates/`; projects can organize supporting files however they prefer.

## `components/`

`components/` contains reusable component templates. Component tags are derived from file paths:

```txt
components/note.j2       -> <note>
components/ui/card.j2    -> <ui-card>
```

Components can be placed inside page content and explicitly resolved with `parse.renderComponents(text)`. They receive tag attributes and slot content through `props`. Component resolution does not render Markdown.

## `data/`

`data/` contains global data files. Veta supports JSON, YAML, TOML, and JavaScript:

```txt
data/site.json              -> data.site
data/navigation.yaml        -> data.navigation
data/theme/colors.toml      -> data.theme.colors
```

Nested directories become nested keys.

## `filters/`

`filters/` contains custom JavaScript template filters. The directory is flat and every filter file must end in `.js`.

```txt
filters/titlecase.js        -> {{ page.title|titlecase }}
```

## `functions/`

`functions/` contains custom JavaScript template functions. The directory is flat and every function file must end in `.js`.

```txt
functions/excerpt.js        -> {{ excerpt(page.content, 120) }}
```

## `public/`

`public/` contains static files copied to the output root. For example:

```txt
public/robots.txt           -> dist/robots.txt
public/images/logo.svg      -> dist/images/logo.svg
public/styles.css           -> Tailwind entrypoint when configured
```

Public assets are copied as-is. Generated HTML minification applies only to generated page output, not to copied public files.
