Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

codeg presets

A gallery of appearance presets for codeg. The app reads index.json from this repository (Settings > Appearance > Preset gallery) and lists every preset in it. Installing one downloads the preset file, checks that its SHA-256 matches the digest listed here, validates it as colours, fonts and spacing only, and then applies it.

What a preset is

One JSON document in the format codeg exports from Settings > Appearance > Presets > Export preset. It carries a base palette, light and dark colour tokens, shape, density, typography (bundled or system font ids) and code theme ids. It cannot carry CSS or script, and the app refuses unknown fields, files over 32 KB, and any file whose digest differs from its listing.

Submitting a preset

  1. In codeg, set up the look you want to share, then Settings > Appearance > Presets > Export preset. Give it a clear name and a short description.
  2. Rename the file to <id>.codeg-preset.json, where <id> is the id inside the file (lowercase letters, digits and hyphens, up to 64 characters). Make sure the author field names you.
  3. Fork this repository, add the file under presets/, and run node build-index.mjs to regenerate index.json with the digest, byte count and card swatches for your file. Node 18 or newer, no dependencies.
  4. Open a pull request with the preset file and the regenerated index. Describe the look in a sentence and, if you like, attach a screenshot.

A preset is accepted when it validates in codeg (import it once to check), its light and dark text stays readable on its surfaces, and its name and description are neutral: describe the look, not another product.

Index format

index.json is { "schemaVersion": 1, "name", "updatedAt", "presets": [...] }. Each listing has id, name, optional description, author, version, base and mode, a url (relative to the index, so files must live in this repository), the sha256 of the file's bytes, its bytes, and optional swatches (up to six colours per mode for the card). The app skips a listing it cannot validate and says how many it skipped.

Using another index

Settings > Appearance > Preset gallery > Source accepts any https link to an index.json on a public host. Preset files must be served from the same site as the index. To run your own gallery, fork this repository and point the app at your fork's raw index.json.

About

Appearance presets for codeg: a public index the app reads, checked by digest

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages