Getting started

Install Verso

One command makes a working, styled site with its own git history. This page covers what that command needs and what it does.

What you need

Verso runs on your own computer. Before you start, check that you have:

  • Node.js 18.19 or later. npm comes with it. Run node --version to check.
  • Git. Verso uses git to save restore points and to publish. Run git --version to check.
  • A browser. The editor opens in your default one.

You don't need a GitHub account or a host yet. You can build and edit a whole site before it goes anywhere.

Make a site

In a terminal, go to the folder where you keep projects and run:

npx verso-cms new my-site
cd my-site
npm run dev

The first command creates a folder called my-site with a complete starter site in it. The last one opens that site in your browser, ready to edit.

What the command does

verso new works in three steps, and tells you as it goes:

  1. Copies the starter site. Templates, blocks, example content, an empty parts/ folder, a favicon, a .gitignore and a netlify.toml, plus the starter's Elevate settings in elevate/, with its colours, fonts and sizes. It writes verso.json with your site's name, made from the folder name (field-notes becomes “Field Notes”), and puts that name in the shared header and footer. It also writes a package.json that depends on verso-cms and elevate-framework.
  2. Installs and sets up. It runs npm install, then sets up Elevate's compiler in elevate/, keeping the starter's settings.
  3. Saves a first restore point. It runs git init on a branch called main and commits everything as "Start a Verso site".

If something goes wrong

Verso stops at the first problem and says what to do. The common ones:

MessageWhat to do
npm isn't installedInstall Node.js from nodejs.org, then run the command again in a new, empty folder.
npm couldn't install the packagesRead the npm messages above it. When the cause is fixed, run npm install inside the site folder.
Git isn't installedThe site still works, but Publish won't. Install git from git-scm.com.
Git doesn't know your name yetRun the two commands below, then press Publish in the editor to make the first restore point.
git config --global user.name "Your Name"
git config --global user.email "you@example.com"

Skipping the install

If you want to look at the files first, or you install packages a different way, add --no-install:

npx verso-cms new my-site --no-install
cd my-site
npm install
npm run dev

With --no-install, Verso copies the starter files and makes the first commit, but doesn't run npm. Run npm install yourself before you edit. The first time you run npm run dev or npm run build, Verso sets up Elevate's compiler on its own.

The three commands

Everything Verso does goes through one command, verso. The starter's package.json gives the two you'll use every day short names:

CommandWhat it does
npm run devRuns verso: opens the editor for the site in this folder.
npm run buildRuns verso build: writes the finished site to dist/.
npx verso-cms new <folder>Starts a new site.

The full list of commands and flags is in the CLI reference. Next, take a tour of what's in your new site.