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

Installation Guide

Skill level: Beginner · Time: 10 minutes

You need Node.js (the program that runs the theme) and a code editor to open the files. If Node.js is not installed yet, download the LTS version from nodejs.org, install it, then come back here.

These steps are the same in the three editions. What npm run dev starts differs, as shown below. See Editions.

Requirements

  • Node.js 22.12.0 or later in the Astro and Sanity editions (declared in package.json under engines). The Tina edition needs 22.23.4 or later, and stay on version 22 or 24, the two that Tina’s tools support
  • npm, which comes with Node.js. Consultiz ships a package-lock.json, so use npm
  • No account for the Astro edition, or for editing on your own computer in the Tina edition. The Sanity edition needs a Sanity account only when you want to edit content
  • A code editor. VS Code is a good free choice; Consultiz recommends extensions for it in .vscode/extensions.json

Check your version in a terminal:

Terminal window
node -v

The result must be v22.12.0 or higher.

Run Consultiz On Your Computer

  1. Unzip the download. Move the theme folder to wherever you keep your projects, then open it in your code editor. It is the folder that contains package.json and README.md.

  2. Open a terminal inside that folder. In VS Code, use Terminal → New Terminal.

  3. Install the dependencies (only needed once, and again after updates):

    Terminal window
    npm ci

    npm ci installs the exact versions listed in package-lock.json. npm install works too.

  4. Start the development server:

    Terminal window
    npm run dev
  5. Open the local address printed in the terminal, usually http://localhost:4321/.

Leave the terminal running while you work. When you save a file, the browser updates on its own. Press Ctrl + C in the terminal to stop the server.

npm run dev generates the settings file .astro/config.generated.json from src/config/config.toml, watches the TOML file for changes, and starts the site. If the TOML has a syntax error, the terminal shows its line; fix it and save again.

Whatnpm run devDoes In Each Edition

EditionWhat it doesUse another port
AstroGenerates the settings file, watches it, and starts the site at http://localhost:4321npm run dev -- --port 4322
TinaThe same, and it also starts the editor at http://localhost:4321/admin/. No account neededSet PORT in .env
SanityThe same as Astro, with the bundled sample content until you connect a project. Then it also watches your Site settingsSet SITE_PORT in .env

In the Sanity edition, npm run dev:all starts the site and the Studio together, with the Studio at http://localhost:3333. To connect your own project, run npm run setup first. See Sanity and Tina.

Build And Preview The Production Site

Terminal window
npm run build
npm run preview

npm run build writes the finished site to the dist/ folder. npm run preview builds it again and serves it locally, so you can test it exactly as visitors will see it. Drafts are not built.

Until you set site.baseUrl in config.toml, or a SITE_URL environment variable, which overrides baseUrl for a build, the build ends with a yellow [site] warning: there is no sitemap, and canonical links, RSS feeds, and llms.txt point to the build host. That is expected on your computer; set the address before you deploy (Quick Start, step 1).

Every Script, In Plain Words

CommandWhat it does
npm run devGenerates the settings file, watches it, and starts the local site with live reload
npm run buildBuilds the production site into dist/ and removes drafts from the sitemap. Warns while site.baseUrl is empty
npm run previewBuilds, then serves the production site locally
npm run astro-checkChecks components and content files against their schemas. Run it after you edit content or code
npm run verifyRuns everything the theme checks: config generation, astro-check, tests, formatting, the production build, and route and section checks
npm run testRuns the theme’s unit tests
npm run formatTidies the formatting of files in src/
npm run format:checkReports files in src/ that npm run format would change
npm run generate-faviconsCreates every favicon size from [site.favicon] image in config.toml
npm run remove-multilingualDeletes every language except the default one. Read Internationalization first
npm run generate-multilingual-contentAdds a language, with copies of your default language to translate. Read Internationalization before you use it
npm run deploy:cfUploads dist/ to Cloudflare Pages. Needs Wrangler installed first (see Deployment)
npm run toml:watchConverts config.toml into .astro/config.generated.json. dev and build already run it

Extra Scripts In The Tina And Sanity Editions

EditionCommandWhat it does
Tinanpm run tina:generateRebuilds the editor’s forms, after you add a section, field, or language
Tinanpm run tina:auditTells you if a save in the editor would lose anything
Tinanpm run setup:tinaWalks through online editing with your own Tina Cloud project
Sanitynpm run setupLogs you in, creates or chooses a project, writes .env, and imports the sample content
Sanitynpm run dev:allStarts the site and the Studio together
Sanitynpm run studioStarts only the Studio
Sanitynpm run import-seedUploads the sample content again, replacing those documents

Next: Quick Start, to make the site yours.

Type something to search...