Sign in

Search issue titles and bodies, change requests and comments. Private repositories you cannot read are not included.

vole
Site
Clone

Read only, no credentials:

https://rodent.software/vole.git

Write over SSH with a registered key:

git clone ssh://git@rodent.software/vole.git

Self-hosted forge that lives in your Git repo.

Rewrite documentation around reader tasks

d1f44d838966c0a4762073f12375ec7562582fdf · Keenan Nemetz · 21h ago · parent 9103f6a8

docs/reference/instance-customization.md → docs/customization.md +147−5

@@ -1,12 +1,74 @@
1 # Instance customization
1 # Customization
2
3 ## Customizing the instance
4
5 The instance customization repository supplies the landing-page introduction,
6 styles, favicon, and static assets. `vole admin init` creates the default private
7 repository; an instance admin can also scaffold it from **Admin →
8 Configuration**.
9
10 ### 1. Name the instance and repository
11
12 Set these values in `vole.toml` and restart Vole:
13
14 ```toml
15 instance_name = "Acme Forge"
16 instance_repo = "vole-instance"
17 ```
18
19 `instance_name` changes the landing-page heading and document titles. Set
20 `instance_repo = ""` to disable repository-provided customization.
21
22 ### 2. Clone the customization repository
23
24 ```sh
25 git clone ssh://git@forge.example.com:2222/vole-instance.git
26 cd vole-instance
27 ```
28
29 If the system sshd listens on port 22, omit `:2222`. You need instance-admin
30 access to read the private customization repository.
31
32 ### 3. Edit the introduction and styles
33
34 Write `profile/README.md` with the landing-page introduction:
35
36 ```markdown
37 # Acme Forge
38
39 Source, reviews, CI, and releases for the Acme team.
40 ```
41
42 Create `profile/custom.css` to override design tokens:
43
44 ```css
45 :root[data-theme] {
46 --accent: #c678dd;
47 --radius: 4px;
48 }
49 ```
50
51 Commit and push the changes:
52
53 ```sh
54 git add profile/README.md profile/custom.css
55 git commit -m "Customize the landing page"
56 git push origin main
57 ```
58
59 Vole reloads the snapshot within a few seconds and keeps the previous snapshot
60 if loading fails. See [Customization paths](#customization-paths) for every
61 supported file, and [Theming](#theming) and [Design tokens](#design-tokens) for
62 theme syntax and security boundaries.
63
64 ## Customization files
2 65
3 66 The repository named by `instance_repo` supplies the instance introduction,
4 67 styles, favicon, and static assets. It is an ordinary private repository by
5 68 default; visitors can receive its designated public files without receiving
6 repository access. For setup, see
7 [Customizing the instance](../configuration.md#customizing-the-instance).
69 repository access.
8 70
9 ## Customization paths
71 ### Customization paths
10 72
11 73 | Path | What it does |
12 74 |---|---|
@@ -39,7 +101,7 @@ An `assets/` destination becomes `/-/static/custom/assets/...`; a relative link
39 101 to anything else, and an absolute or external URL, stays as written. The public
40 102 and private introductions resolve the same way, so one image serves both readers.
41 103
42 ## Theming
104 ### Theming
43 105
44 106 `profile/custom.css` loads after `vole.css`, `everforest.css`, `palettes.css`,
45 107 and the selected theme pack. Override design tokens instead of copying component
@@ -137,3 +199,83 @@ When tokens are insufficient, page-level classes include `.panel`, `.readme`,
137 199 `.tabs`, `.chip`, `.label`, `.status`, `.config-table`, `.diff`, and `.blob`.
138 200 These classes are not a stable public API; prefer tokens because upgrades can
139 201 change markup.
202
203 ## Media previews
204
205 Preview images and 3D models in the code browser, a commit or compare diff, and
206 the Files tab of a change request. Markdown files use the same support.
207
208 No configuration is required. A format with no useful source view, such as a PNG
209 or binary STL, appears in place of the source table. A text format that is also a
210 model or image, such as SVG, OBJ, ASCII STL, or glTF, keeps its source view and
211 gains a **Preview** toggle.
212
213 ### Images
214
215 | Extensions | Served as |
216 |---|---|
217 | `.png` | `image/png` |
218 | `.jpg` `.jpeg` | `image/jpeg` |
219 | `.gif` | `image/gif` |
220 | `.webp` | `image/webp` |
221 | `.avif` | `image/avif` |
222 | `.bmp` | `image/bmp` |
223 | `.ico` | `image/x-icon` |
224 | `.svg` | `image/svg+xml` |
225
226 Raw bytes are served with the image's type, so an `<img>` works. Every other
227 extension stays `text/plain` and the response is `nosniff`, so an HTML file in a
228 repository is never rendered on the forge's origin. An SVG opened directly is
229 made inert by a Content-Security-Policy; as an image it renders normally.
230
231 In a Markdown document, an image path is resolved against the document, not the
232 page it is rendered on. A README beside `images/board.png` names that path. The
233 instance introduction resolves `assets/...` to the customization assets; see
234 [Images in the introduction](#images-in-the-introduction).
235
236 An image larger than 32 MiB is a download rather than an inline preview.
237
238 ### 3D models
239
240 | Extension | Format |
241 |---|---|
242 | `.stl` | STL, binary or ASCII |
243 | `.obj` | Wavefront OBJ geometry |
244 | `.gltf` | glTF (JSON) |
245 | `.glb` | glTF (binary) |
246 | `.3mf` | 3D Manufacturing Format |
247
248 The viewer runs in the browser and needs only the file. Drag to turn the model
249 like a turntable: sideways spins it about its own up axis, up and down tips it
250 over the top, and the two mix without rolling it. Scroll, pinch, or use the + and
251 − buttons to zoom; Front, Top and Right put a known side toward you; the
252 remaining buttons reset the view and toggle a wireframe. On a diff the before
253 and after models turn and zoom together, and Sync turns that link off for a
254 reader who wants each side at its own angle and zoom. It is loaded on demand, so
255 a page without a model downloads none of it. Without JavaScript or WebGL, the
256 file's download link stays visible.
257
258 A Markdown document names a model the same way it names a picture: a relative
259 image path whose extension is on the list above. A README can therefore show an
260 assembly beside the prose. The image's alt text labels the preview, and the
261 file's name is what the fallback offers to download. A path in a document that
262 has no place in a tree — an issue body, the instance introduction — stays an
263 image, because there is no raw route behind it for the viewer to fetch.
264
265 A `.gltf` may name buffers and textures beside it; they are fetched through the
266 same raw path. A companion `.mtl` for an `.obj` is not loaded, so an OBJ arrives
267 as geometry with a plain material.
268
269 Compressed glTF assets are not supported. A model that uses Draco, KTX2, or
270 meshopt reports that it could not be loaded and keeps its download link.
271
272 A model larger than 64 MiB is a download rather than an inline preview in the
273 code browser, which reads the file's size before rendering. A Markdown document
274 is rendered from its text alone, so the path is all that decides there: a
275 README's model is offered to the viewer whatever its size.
276
277 ## Next
278
279 - [Configuration](configuration.md) — settings, listeners, and HTTPS.
280 - [Workflows](workflows.md#run-artifacts) — build and publish artifacts.
281 - [Releases](releases.md) — attach downloads rather than preview them.