# Installation

## Installation Guide

Veltro requires **Node.js 22.12.0 or later**, as declared in `package.json`. The project uses `npm` and includes a `package-lock.json`.

<Aside type="tip">
  Use the scripts in `package.json`. The development and build scripts
  regenerate the JSON config that Astro imports.
</Aside>

### Install Node.js

<Tabs>
  <TabItem label="Windows">

    Install Node.js from [nodejs.org](https://nodejs.org/en/download/), then verify it:

    ```bash
    node -v
    ```

  </TabItem>
  <TabItem label="macOS">

    Install Node.js with Homebrew or the official installer:

    ```bash
    brew install node
    node -v
    ```

  </TabItem>
  <TabItem label="Linux">

    Install Node.js with your preferred package manager or the official installer, then verify it:

    ```bash
    node -v
    ```

  </TabItem>
</Tabs>

### Install Dependencies

From the `veltro/` project directory:

```bash
npm install
```

### Start Development

```bash
npm run dev
```

This starts the TOML watcher and Astro development server together. Changes to `src/config/config.toml` are written to `.astro/config.generated.json` automatically.

### Check, Test, And Build

```bash
npm run astro-check
npm test
npm run build
```

The production build regenerates the config, builds the static Astro site, removes draft pages from the sitemap, and writes the result to `dist/`.

### Preview A Production Build

```bash
npm run preview
```

The preview script performs a fresh build before starting Astro Preview.

### Other Verified Scripts

```bash
npm run format
npm run generate-favicons
npm run generate-multilingual-content
npm run remove-multilingual
npm run deploy:cf
```

`deploy:cf` runs `wrangler pages deploy`; configure Wrangler before using it.