Skip to content
New: Customize your theme with an AI assistant. Read the guide

Installation Guide

Veltro uses npm, which comes with Node.js, and includes a package-lock.json. The Node.js version you need depends on your edition:

EditionNode.js version
Astro22.12.0 or later
Tina22 (22.23.4 or later) or 24. Tina’s command line tool supports only those two versions
Sanity22.12.0 or later

Install Node.js

Install Node.js from nodejs.org, then verify it:

Terminal window
node -v

Install Dependencies

Unzip the theme and open a terminal in its folder. In the Tina edition, that is the themes/veltro-tina folder inside the zip.

Terminal window
npm ci

This installs the exact dependency versions from package-lock.json.

Start Development

Terminal window
npm run dev

Your site is at http://localhost:4321. What happens next depends on your edition:

  • Astro: this generates the settings file from src/config/config.toml, watches that file for changes, and starts the site. Edit the files in your code editor.
  • Tina: this does the same, and also starts the editor. Open http://localhost:4321/admin/ and click Enter Edit Mode. You need no account and no password. See Tina.
  • Sanity: this does the same as the Astro edition, and the site runs with the bundled demo content, with no account. To edit it, run npm run setup to connect your own Sanity project, then npm run dev:all, and open the Studio at http://localhost:3333. See Sanity.

If another program uses port 4321:

  • Astro: run npm run dev -- --port 4322.
  • Tina: set PORT. TINA_GRAPHQL_PORT and TINA_DATALAYER_PORT move the editor’s other two ports, 4001 and 9000.
  • Sanity: set SITE_PORT in .env. STUDIO_PORT moves the Studio from 3333.

Check, Test, And Build

Run these one at a time:

Terminal window
npm run astro-check
npm test
npm run build

The production build regenerates the settings file, builds the static Astro site, removes draft pages from the sitemap, and writes the result to dist/. In the Sanity edition, it reads your published content, or the bundled demo content if no project is connected.

Preview A Production Build

Terminal window
npm run preview

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

Other Scripts

ScriptWhat it does
formatFormats the files in src/ with Prettier
test:watchRuns the unit tests again when a file changes
generate-faviconsMakes the favicon files from your source image. See Site Identity & Logo
generate-multilingual-contentAdds a language. It needs the language’s details, and the flags differ by edition. See Internationalization
remove-multilingualRemoves every language except your default one. See Internationalization first
remove-draft-from-sitemapRemoves draft pages from the sitemap. build and preview run it for you
deploy:cfRuns wrangler pages deploy. Wrangler isn’t one of the theme’s dependencies, so install and configure it first

Scripts Only In The Tina Edition

ScriptWhat it does
tina:generateRebuilds the editor’s forms. Run it after you add a section, a field, or a language
tina:auditTells you if a save in the editor would lose anything. Run it after you edit files by hand
setup:tinaWalks you through online editing with your own Tina Cloud project. It’s optional

Scripts Only In The Sanity Edition

ScriptWhat it does
setupLogs you in, creates your project, writes .env, and uploads the demo content
dev:allStarts the website and the Studio together
studioStarts the Studio on its own
import-seedUploads the demo content again. It replaces documents with the same IDs. Add -- --missing to keep the documents you already have
sanity:validateChecks the Studio’s schema
studio:buildBuilds the Studio
studio:deployPuts the Studio online
build:previewBuilds the preview server for draft preview online
start:previewStarts the preview server
Type something to search...