Vole docs Source

Customization#

Customizing the instance#

The instance customization repository supplies the landing-page introduction, styles, favicon, and static assets. vole admin init creates the default private repository; an instance admin can also scaffold it from Admin → Configuration.

1. Name the instance and repository#

Set these values in vole.toml and restart Vole:

instance_name = "Acme Forge"
instance_repo = "vole-instance"

instance_name changes the landing-page heading and document titles. Set instance_repo = "" to disable repository-provided customization.

2. Clone the customization repository#

git clone ssh://git@forge.example.com:2222/vole-instance.git
cd vole-instance

If the system sshd listens on port 22, omit :2222. You need instance-admin access to read the private customization repository.

3. Edit the introduction and styles#

Write profile/README.md with the landing-page introduction:

# Acme Forge

Source, reviews, CI, and releases for the Acme team.

Create profile/custom.css to override design tokens:

:root[data-theme] {
  --accent: #c678dd;
  --radius: 4px;
}

Commit and push the changes:

git add profile/README.md profile/custom.css
git commit -m "Customize the landing page"
git push origin main

Vole reloads the snapshot within a few seconds and keeps the previous snapshot if loading fails. See Customization paths for every supported file, and Theming and Design tokens for theme syntax and security boundaries.

Customization files#

The repository named by instance_repo supplies the instance introduction, styles, favicon, and static assets. It is an ordinary private repository by default; visitors can receive its designated public files without receiving repository access.

Customization paths#

Path What it does
profile/README.md Sanitized Markdown introduction above the repository list
profile/private/README.md Replaces the introduction for signed-in viewers
profile/custom.css Styles loaded after built-in and selected theme styles
profile/themes/<id>.css One self-describing selectable theme per file
profile/favicon.svg Replaces the favicon links
assets/ Files served at /-/static/custom/assets/

Other files are ignored. Assets are limited to CSS, images, and fonts; same-origin scripts are not accepted as customization. Push changes to publish them. Vole reloads the snapshot within a few seconds and keeps the previous snapshot when loading fails. An empty profile/README.md removes the introduction body.

instance_name controls the landing-page heading, document titles, and brand link's accessible name. It does not rename the Vole software or replace its brand mark.

Images in the introduction#

A relative destination in the introduction is a path in the customization repository. Only a destination under assets/ becomes a link, because that is the namespace the instance serves as files. Point at a picture by its path there: assets/logo.png, or ../assets/light/logo.png from profile/README.md.

An assets/ destination becomes /-/static/custom/assets/...; a relative link to anything else, and an absolute or external URL, stays as written. The public and private introductions resolve the same way, so one image serves both readers.

Theming#

profile/custom.css loads after vole.css, everforest.css, palettes.css, and the selected theme pack. Override design tokens instead of copying component rules so layout, contrast, and responsive behavior remain intact.

The Appearance picker includes built-in Everforest variants, Catppuccin Mocha and Latte, Nord, Solarized Light, Rosé Pine Moon and Dawn, Kanagawa Wave, Dracula, Tokyo Night, and Ayu Light, followed by instance theme packs.

Theme packs#

Each file under profile/themes/ defines one theme. Its file name supplies both the id and a human-readable label: acme-ocean.css becomes Acme Ocean.

/* profile/themes/acme-ocean.css */
:root[data-theme="acme-ocean"] {
  color-scheme: dark;
  --bg: #0b1720;
  --bg-panel: #102433;
  --bg-raised: #163041;
  --fg: #d7e8f0;
  --fg-muted: #8fb0c0;
  --fg-faint: #6f8f9f;
  --accent: #38bdf8;
  --accent-fg: #04121a;
  --accent-soft: color-mix(in srgb, var(--accent) 14%, transparent);
}

A light theme must set color-scheme: light and light surface and text tokens:

/* profile/themes/acme-paper.css */
:root[data-theme="acme-paper"] {
  color-scheme: light;
  --bg: #fffdf7;
  --bg-panel: #f8f3e8;
  --bg-raised: #f1eadc;
  --fg: #2b2a26;
  --fg-muted: #6b675d;
  --fg-faint: #8d887c;
  --accent: #9a5b13;
  --accent-fg: #fffdf7;
  --accent-soft: color-mix(in srgb, var(--accent) 14%, transparent);
}

Theme ids use lowercase letters, digits, and dashes and are at most 41 characters. They cannot collide with system, nord, dracula, tokyo-night, or names beginning with everforest-, catppuccin-, solarized-, rose-pine-, kanagawa-, or ayu-. An invalid file fails snapshot loading and leaves the previous theme active.

Every theme file is linked on every page, so keep theme packs small. A reader's selection lives in browser localStorage, not in the account database. Deleting a selected theme returns that browser to System.

Design tokens#

Scope overrides to :root[data-theme], not plain :root. Built-in selectors such as :root[data-theme^="everforest-"] are more specific than :root and would otherwise win.

:root[data-theme] {
  --accent: #c678dd;
  --accent-soft: color-mix(in srgb, var(--accent) 14%, transparent);
  --radius: 4px;
  --radius-lg: 6px;
  --page-max: 1200px;
}

Use these selectors when a value differs between Everforest dark and light variants:

:root[data-theme^="everforest-dark"]  { --bg: #101418; }
:root[data-theme^="everforest-light"] { --bg: #fffdf7; }
Group Tokens
Surfaces --bg, --bg-panel, --bg-raised, --bg-hover, --bg-active, --border, --border-strong
Text --fg, --fg-muted, --fg-faint
Identity --accent, --accent-fg, --accent-soft
Status --good, --good-soft, --bad, --bad-soft, --warn, --warn-soft, --running, --merged, --merged-soft, --status-fg
Shape --radius, --radius-lg, --page-max, --page-gutter, --search-w
Type --font, --mono, --fs, --lh; leave --font-scale to the reader's text-size preference
Syntax --syn-comment, --syn-punctuation, --syn-operator, --syn-number, --syn-string, --syn-keyword, --syn-function, --syn-type, --syn-variable, --syn-added, --syn-deleted

When tokens are insufficient, page-level classes include .panel, .readme, .md, .repo-card, .repo-grid, .home-grid, .home-rail, .repohead, .tabs, .chip, .label, .status, .config-table, .diff, and .blob. These classes are not a stable public API; prefer tokens because upgrades can change markup.

Media previews#

Preview images and 3D models in the code browser, a commit or compare diff, and the Files tab of a change request. Markdown files use the same support.

No configuration is required. A format with no useful source view, such as a PNG or binary STL, appears in place of the source table. A text format that is also a model or image, such as SVG, OBJ, ASCII STL, or glTF, keeps its source view and gains a Preview toggle.

Images#

Extensions Served as
.png image/png
.jpg .jpeg image/jpeg
.gif image/gif
.webp image/webp
.avif image/avif
.bmp image/bmp
.ico image/x-icon
.svg image/svg+xml

Raw bytes are served with the image's type, so an <img> works. Every other extension stays text/plain and the response is nosniff, so an HTML file in a repository is never rendered on the forge's origin. An SVG opened directly is made inert by a Content-Security-Policy; as an image it renders normally.

In a Markdown document, an image path is resolved against the document, not the page it is rendered on. A README beside images/board.png names that path. The instance introduction resolves assets/... to the customization assets; see Images in the introduction.

An image larger than 32 MiB is a download rather than an inline preview.

3D models#

Extension Format
.stl STL, binary or ASCII
.obj Wavefront OBJ geometry
.gltf glTF (JSON)
.glb glTF (binary)
.3mf 3D Manufacturing Format

The viewer runs in the browser and needs only the file. Drag to turn the model like a turntable: sideways spins it about its own up axis, up and down tips it over the top, and the two mix without rolling it. Scroll, pinch, or use the + and − buttons to zoom; Front, Top and Right put a known side toward you; the remaining buttons reset the view and toggle a wireframe. On a diff the before and after models turn and zoom together, and Sync turns that link off for a reader who wants each side at its own angle and zoom. It is loaded on demand, so a page without a model downloads none of it. Without JavaScript or WebGL, the file's download link stays visible.

A Markdown document names a model the same way it names a picture: a relative image path whose extension is on the list above. A README can therefore show an assembly beside the prose. The image's alt text labels the preview, and the file's name is what the fallback offers to download. A path in a document that has no place in a tree — an issue body, the instance introduction — stays an image, because there is no raw route behind it for the viewer to fetch.

A .gltf may name buffers and textures beside it; they are fetched through the same raw path. A companion .mtl for an .obj is not loaded, so an OBJ arrives as geometry with a plain material.

Compressed glTF assets are not supported. A model that uses Draco, KTX2, or meshopt reports that it could not be loaded and keeps its download link.

A model larger than 64 MiB is a download rather than an inline preview in the code browser, which reads the file's size before rendering. A Markdown document is rendered from its text alone, so the path is all that decides there: a README's model is offered to the viewer whatever its size.

Next#

↑↓ to move Enter to open Esc to close