galley ↑ subaud

Themes

Share a finished document, in your own colours

When a review is approved, galley can hand the document to someone who only needs to read it. It turns the Markdown into one HTML page that opens offline, with a sidebar of its sections, styled code and tables, and its diagrams drawn. A theme decides what that page looks like: its colours, fonts and logo. galley ships a default theme, so you only make one if you want your own brand on the page.

share

Share an approved document

After you approve a review, the Revise button becomes Share. Its menu has four items:

The two Share items work on macOS. The HTML page is a single file: images that sit next to the document, fonts and diagrams are all inside it, so it opens without a network connection.

While you are still editing, HTML preview in the bar opens the same page in a new tab. It reloads each time the document is saved, so you can watch the shared version change as you and the agent work.

the default

The default theme

With no theme set, every document gets galley's own page: a sidebar listing the document's sections, headings in an amber accent, code and quotes on soft cards, tables with a small monospace header and striped rows, and diagrams drawn in matching colours. It follows your reader's light or dark setting. It has no header and no logo, so it suits any document.

A test document shared with galley's default theme, in light mode: a sidebar of the document's sections on the left, the title and section headings in amber, an inline code chip and an underlined link in the body, and the top of a flowchart drawn on a soft grey card.
default — no theme set, light mode

your own theme

Make your own theme

A theme is a folder of a few files. You make it once, and every project that names it gets the same look.

1. Create the folder

Themes live in your galley config folder, one folder per theme. For a theme called acme:

~/.config/galley/themes/acme/
  theme.json
  logo-light.svg
  logo-dark.svg

Only theme.json is needed. The two logos are optional.

2. Choose five colours

theme.json names five colours for a light page and five for a dark one. Each colour has one job, and galley mixes the rest of the page's shades from these five:

{
  "label": "Acme Research",
  "light": { "bg": "#ffffff", "fg": "#1a1a2e", "muted": "#5c5c70", "line": "#e4e4ec", "accent": "#6b4eff" },
  "dark":  { "bg": "#121218", "fg": "#ececf4", "muted": "#9a9ab0", "line": "#2c2c3a", "accent": "#a594ff" }
}

Anything you leave out comes from the default theme, so a theme can be as small as one accent colour.

3. Add a logo and a label

logo-light.svg is the logo as it should look on a light page, and logo-dark.svg as it should look on a dark one. Each is shown about 26 pixels high at the left of a header bar. label is a short line of text beside the logo, such as a team name.

The header only appears when a theme has a logo or a label. Leave both out and the page starts straight with the sidebar and the document, as the default does.

The same test document shared with the acme theme from this page, in light mode: a header bar with a violet triangle, the word Acme and the label Acme Research, then the sidebar of sections and the body with the title and section headings in violet, a violet-tinted code chip and the flowchart's shapes in violet.
acme — the theme.json above, with a logo and a label

4. Use it in a project

In the project whose documents should use the theme, add .galley/config.json:

{ "theme": "acme" }

galley looks for this file in the document's folder and then in each folder above it, and uses the nearest one. So one file at the top of a repository covers every document in it.

5. Check it

Render a test document without opening a review:

$ galley render notes.md
/path/to/notes.html

Open the file and look at it in both light and dark mode. A good test document has a few sections and subsections, a table, some code and a diagram. If the theme has a problem, such as a misspelled name or a broken theme.json, galley render prints the error instead of writing a page.

going further

Going further

Two more options cover what the five colours can't:

A theme changes how the page looks, not how it is laid out. Every theme keeps the same sidebar, body and header.