Getting started

Publishing

Publish checks the site, saves a restore point that says what changed, and sends it to your repository. Your host does the rest.

Everything you change in the editor is saved to your site's files straight away. Publish is how those changes leave your computer. Until you press it, nothing you do in the editor reaches the live site.

What Publish does

  1. It checks the site. Verso runs the same checks the build does: every template, every page, every required field, every Elevate class. If anything would make the build fail, it stops, shows what to fix at the top right, and publishes nothing. Warnings, like content left over from a field a template no longer has, don't stop it.
  2. It saves a restore point. It commits every change with a message a person can read, like Update Home (headline, intro) and About (title), or Add Spring opening hours.
  3. It pushes. It sends the commit to your repository. If your site is connected to a host, the host builds and updates the live site, usually within a minute or two.

The first press shows what's waiting to go, with a box that asks What changed? Type a few words if you like, such as “Winter opening hours”, and press Publish again or Enter. History shows your words beside the date, with Verso's own summary kept underneath. Leave the box empty and Verso's summary is the message.

When there's nothing to publish, the button turns grey and says Published.

Connecting a repository

A new site has git but no remote, so there's nowhere to push yet. Publish still works: it saves the restore point and tells you to connect the folder to a repository. To connect one, make an empty repository on GitHub (no README), then in your site's folder:

git remote add origin https://github.com/you/my-site.git
git push -u origin main

From then on, Publish pushes on its own. If you skip the push, the next Publish sets up the branch for you.

When someone else published first

If two people edit the same site, the second Publish finds the repository has moved on. Verso brings the other person's changes in first, then pushes yours. When you changed different pages, that's all that happens.

When you both changed the same page, Verso shows both versions side by side and asks which to keep. See When two people edit.

Verso also stays in step when you open it. Each time the editor starts, it pulls the latest published version, as long as you have no unpublished changes. If you do, it leaves your folder alone and tells you to publish them first.

What gets published

Publish commits everything that changed in the folder, not only content. If you edited a template in your code editor, that goes too, and the commit message lists the changed site files after the pages. A change to the shared header and footer is listed by that name. Your .gitignore keeps node_modules/, dist/ and the image cache out.

Pages marked as drafts are committed and pushed like any other page, but they're left out of the built site. See Site view and drafts.

Building on your own computer

You don't need to build before publishing; your host builds. To see exactly what the host will make, run:

npm run build

Verso writes the finished site to dist/: one folder and index.html per page, each page's images beside it, and one elevate.css. Wide JPEGs and PNGs get smaller copies. The first build of a site with many images takes a little while; the copies are kept in .verso-cache/, so later builds are quick.

Next: put it online.