Getting Started

Set up a new archival site through the hosted editor at editor.archival.dev, or install the archival CLI locally to clone, build, and run your site from a git repo.

Using editor.archival.dev/new

The simplest way to set up an archival repo is to go to editor.archival.dev/new and we'll set you up with a working archival site right away. This will create a new git repo in your github account (or if you're signed in with email, we'll create one on our servers). You can either purchase a domain or use an existing one for your site.

Once you have a site set up, you will see it at editor.archival.dev, where you can make changes to the content, preview in real time, adjust settings, and use task mode to change your site by making requests and uploading files.

To get a local copy of your website, go to your site's settings and click "Create Git Remote" under Git. Name the remote after the machine you'll use it from, and we'll give you a git remote add command to run.

The remote is addressed by your site's domain, so a site needs a domain connected before you can create one. From there git clone, fetch and push all work as usual, and pushing publishes your site exactly as publishing from the editor does. Keep large media in Uploads rather than in git — pushes over 100MB will fail.

Developing your archival website locally

When you clone or create an archival repo, you can use the archival CLI to build, run, and maintain your website.

If you already have the rust toolchain locally, you can install archival from cargo, using cargo install archival.

If you'd prefer to just install binaries, you can install via npm using npm install -g archival, which will install the appropritate binary for your machine globally.

You can now run archival run in your website’s repo.

You should see a message telling you that your website is available at http://localhost:1024. If you want to choose a different port, run archival run --port 1234.

The run command automatically watches your filesystem and will rebuild your website whenever files change. Try modifying an object file to see the site update.

Manual site creation

To create an archival website without the archival onboarding experience or purchasing an archival site, you can install archival and create a simple structure locally:

mkdir my-website

cd my-website

git init

Now add the basics for archival to work:

echo "dist" >> .gitignore

mkdir public layout objects pages

echo "[test] name="string"" >> archival_objects.toml

echo "name = "hello"" >> objects/test/first.toml

echo "{{ page_content }}" >> layout/theme.liquid

echo "{% layout 'theme' %} {% for o in test %} {{test.name}} {% endfor %}" >> pages/index.liquid

This will create:

  • a layout
  • an objects definition file with an object type test
  • an example test object
  • a theme to render our page in
  • a page that renders our theme and our objects