Sign in

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

vole
Clone

Read only, no credentials:

https://rodent.software/vole.git

Write over SSH with a registered key:

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

A free and open-source forge that lives in your Git repo.

Derive theme metadata from the stylesheet file name

d222b0cf5d23444ea5df9429ec7d3690407dd00c · Keenan Nemetz · 1d ago · parent f7a34d87

Derive theme metadata from the stylesheet file name

profile/themes/index.json is gone. Each profile/themes/<id>.css is self-describing: the file name is the id and the label (acme-ocean.css becomes Acme Ocean), and the rules are scoped to that id. The loader discovers the files, validates the names, and sorts them by label.

Remove the manifest from the starter repository, its README, the Admin Configuration path table, and the configuration docs. An old index.json in an existing repository is ignored.

docs/configuration.md +13−28

@@ -155,7 +155,6 @@ visitors either way.
155 155 | `profile/README.md` | Landing page introduction; markdown, sanitized like an issue body |
156 156 | `profile/private/README.md` | Replaces it for signed-in viewers when present |
157 157 | `profile/custom.css` | Instance-wide styles, loaded last |
158 | `profile/themes/index.json` | Lists the themes the Appearance picker offers |
159 158 | `profile/themes/<id>.css` | One stylesheet per selectable theme |
160 159 | `profile/favicon.svg` | Replaces the favicon links |
161 160 | `assets/` | Served at `/static/custom/assets/`; CSS, images and fonts only |
@@ -186,24 +185,10 @@ then stay intact.
186 185
187 186 #### Theme packs
188 187
189 Account → Appearance lists the built-in Everforest variants plus every theme in
190 `profile/themes/index.json`. A theme is a stylesheet named after its id, and its
191 rules apply only while that theme is selected:
192
193 ```text
194 profile/themes/index.json
195 profile/themes/acme-ocean.css
196 profile/themes/acme-paper.css
197 ```
198
199 ```json
200 {
201 "themes": [
202 { "id": "acme-ocean", "name": "Acme Ocean" },
203 { "id": "acme-paper", "name": "Acme Paper" }
204 ]
205 }
206 ```
188 Account → Appearance lists the built-in Everforest variants plus every CSS file
189 in `profile/themes/`. A theme is self-describing: the file name is the id and
190 the label, and the rules are scoped to that id. `acme-ocean.css` is the
191 “Acme Ocean” theme; `acme-paper.css` is “Acme Paper”.
207 192
208 193 ```css
209 194 /* profile/themes/acme-ocean.css */
@@ -237,16 +222,16 @@ profile/themes/acme-paper.css
237 222 }
238 223 ```
239 224
240 The id must use lowercase letters, digits, and dashes (at most 41 characters),
241 and cannot be `system` or start with `everforest-`. A theme listed without its
242 stylesheet, a duplicate id, or an empty name fails the snapshot load with a
243 message on the Admin page; the previous theme stays in use. A light theme must
244 set `color-scheme: light` and light surface and text tokens, or form controls and
245 inherited colours stay dark.
225 The file name must use lowercase letters, digits, and dashes (at most 41
226 characters), and cannot be `system` or start with `everforest-`. A file whose
227 name breaks that rule fails the snapshot load with a message on the Admin page;
228 the previous theme stays in use. A light theme must set `color-scheme: light`
229 and light surface and text tokens, or form controls and inherited colours stay
230 dark.
246 231
247 Every listed theme is linked on every page, so keep the files small. The
248 selection is a browser preference, not an account setting: it lives in
249 `localStorage`, and a theme removed from the manifest falls back to System.
232 Every theme file is linked on every page, so keep them small. The selection is a
233 browser preference, not an account setting: it lives in `localStorage`, and a
234 theme whose file is deleted falls back to System.
250 235
251 236 #### Tokens
252 237