> ## Documentation Index
> Fetch the complete documentation index at: https://docs.holydocs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# holydocs check

Validate your HolyDocs config file and navigation references before deploying.

## Usage

```bash
holydocs check [options]
```

Validates the local docs configuration and warns about common mistakes such as invalid theme values or navigation entries that point at files that do not exist.

## Options

| Option | Description | Default |
|---|---|---|
| `--dir <path>` | Project directory containing `docs.json`, `docs.yaml`, `docs.yml`, or `mint.json` | Current directory / nearest project root |

## Examples

### Basic Validation

```bash
holydocs check
```

Output:

```
  Validating documentation config...

  Config: /path/to/docs.json

✓ Configuration is valid!
```

### Config with Warnings

```bash
holydocs check
```

Example warning output:

```
  Validating documentation config...

  Config: /path/to/docs.json

1 warning(s):
  ⚠ Page "guides/setup" referenced in navigation but file not found (guides/setup.mdx)

⚠ Configuration is valid with warnings.
```

### Check a Different Directory

```bash
holydocs check --dir ./docs
```

## Checks Performed

### Errors

These fail the command:

- Missing `name`
- Missing `colors` or `colors.primary`
- Invalid `colors.primary` hex value
- Missing `navigation`
- `navigation.groups` or `navigation.tabs` is not an array
- Unknown theme name
- Invalid JSON or YAML syntax

### Warnings

These are printed but do not fail the command:

- Navigation references a page that does not exist as `.mdx` or `.md`
- `logo` is a relative string path instead of an absolute path or URL
- A redirect entry is missing `source` or `destination`

## Supported Config Files

The command checks the first config file it finds in the target directory:

1. `docs.json`
2. `docs.yaml`
3. `docs.yml`
4. `mint.json`

Run `holydocs check` before [`holydocs deploy`](/cli/deploy). For link validation inside page content, run [`holydocs links`](/cli/links) as a second step.