Skip Navigation
StructureStructure

ThemeFeatureFlag

A feature switch in the features section of a theme-settings.json file.

struct ThemeFeatureFlag

Overview

Feature switches are the swift-docc-render mechanism for turning parts of the page on or off. Each switch is identified by its key path below features, for example docs.onThisPageNavigator.disable. The set of switches is kept deliberately small: a theme should change the look with CSS whenever the information is already present in the page, and use a switch only where the difference cannot be expressed in CSS.

All switches defined by swift-docc-render are accepted so that theme files can be shared. Switches that only make sense for the JavaScript renderer are accepted without effect; isHonoured tells them apart.

Topics

Relationships

  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.SendableMetatype