Vole docs Source

Sites#

Publish a static site from a repository branch, a local build directory, or CI. Vole serves each public repository at <repo>.<pages_domain> using the same instance and Git storage as the forge.

Enable sites#

An instance admin sets the site domain and branch in vole.toml:

pages_domain = "pages.example.net"
pages_ref = "pages"

Restart Vole after changing the configuration. pages_domain is empty by default, which disables sites. Point a wildcard DNS record such as *.pages.example.net at the instance.

With automatic HTTPS, Vole obtains a certificate for each public site host on its first request; it does not obtain a wildcard certificate. Behind a TLS proxy, preserve the Host header so Vole can select the site. See Running behind a proxy.

Use a separate registrable domain

Serve sites from pages.example.net when the forge is forge.example.com. Site authors control browser content, and a separate registrable domain keeps that content from sharing the forge's same-site security assumptions. See Same-site risk.

Only public repositories have public sites. A private repository's site returns 404; there is no browser sign-in on a site host.

Publish a build directory#

From a repository clone, build your static site into a directory. For a minimal first deployment, create one yourself:

mkdir -p dist
printf '<h1>Hello from Vole</h1>\n' > dist/index.html

Preview the deployment, publish it, and inspect its status:

vole pages deploy dist --dry-run
vole pages deploy dist
vole pages status

You need the maintainer or runner role. For a repository named demo with the configuration above, the site is https://demo.pages.example.net/ once DNS and HTTPS are configured.

deploy replaces the configured site branch with the directory's contents. A file removed from the next build disappears from the site. Publishing identical files does not create another change.

Dotfiles including .nojekyll and .well-known/ are published. Vole skips .git and symbolic links so deployment cannot include files outside the chosen build directory.

If the instance uses a branch other than pages, pass --branch <branch> to each command. Remove the site and its branch with:

vole pages unpublish

Publish with Git#

You can publish the branch without the Vole CLI. Use a separate clone or worktree so the orphan site branch does not disturb your source checkout:

git switch --orphan pages
printf '<h1>Hello from Vole</h1>\n' > index.html
git add index.html
git commit -m "Publish the site"
git push origin pages

A manual site-branch push also needs the maintainer or runner role. A read-only or contributor account cannot publish it.

A workflow can deploy its build output instead. See Publish a website; Vole rejects an older run that would roll back a newer branch.

Serving behavior#

Same-site risk#

Hosted sites contain author-controlled content on host names you control. When the forge and sites share a registrable domain, a malicious site is same-site with the forge. It can participate in top-level navigations that carry SameSite=Lax cookies, attempt window or frame interactions, and benefit from future domain-wide cookies.

Vole's CSRF tokens, Cross-Origin-Opener-Policy, and frame rules provide additional boundaries, but a separate registrable domain removes the underlying same-site relationship. Use one whenever site publishers are not as trusted as the forge itself.

Next#

↑↓ to move Enter to open Esc to close