Skip Navigation
EnumerationEnumeration

ThemeSettings

Represents a theme-settings.json file from swift-docc-render.

enum ThemeSettings

Overview

This namespace names the types that model the theme settings format used by swift-docc-render, allowing themes to be shared between swift-docc and swift-docc-static. The same model, and the same validation, is used for the built-in themes compiled into the binary and for custom theme files read at run time.

Format

A theme-settings.json file has the following structure:

{
  "theme": {
    "color": {
      "fill": { "light": "#ffffff", "dark": "#1d1d1f" },
      "link": "#0066cc"
    },
    "typography": {
      "html-font": "system-ui, sans-serif"
    }
  },
  "features": {
    "docs": { "onThisPageNavigator": { "disable": true } }
  }
}

Colour values can be either:

  • A single string value (used for both light and dark modes)

  • An object with light and dark keys for mode-specific values

Topics