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 --versionto check. - Git. Verso uses git to save restore points and to publish. Run
git --versionto 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:
- Copies the starter site. Templates, blocks, example content, an empty
parts/folder, a favicon, a.gitignoreand anetlify.toml, plus the starter's Elevate settings inelevate/, with its colours, fonts and sizes. It writesverso.jsonwith your site's name, made from the folder name (field-notesbecomes “Field Notes”), and puts that name in the shared header and footer. It also writes apackage.jsonthat depends onverso-cmsandelevate-framework. - Installs and sets up. It runs
npm install, then sets up Elevate's compiler inelevate/, keeping the starter's settings. - Saves a first restore point. It runs
git initon a branch calledmainand 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:
| Message | What to do |
|---|---|
| npm isn't installed | Install Node.js from nodejs.org, then run the command again in a new, empty folder. |
| npm couldn't install the packages | Read the npm messages above it. When the cause is fixed, run npm install inside the site folder. |
| Git isn't installed | The site still works, but Publish won't. Install git from git-scm.com. |
| Git doesn't know your name yet | Run 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:
| Command | What it does |
|---|---|
npm run dev | Runs verso: opens the editor for the site in this folder. |
npm run build | Runs 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.