Skip Navigation
StructureStructure

SidebarDocument

The shared navigation sidebar document and the names that connect it to the pages embedding it.

struct SidebarDocument

Overview

The navigation tree of a documentation site is written once, as a standalone HTML document at the root of the output directory (see fileName). Every documentation page embeds that document in an <iframe> and selects its own row through the URL fragment, so the current page is highlighted and its ancestors are expanded purely with CSS (:target), without JavaScript.

This type is the single authoritative home of the names that the Swift code, the generated stylesheet and the generated scripts must agree on, such as the file name, the row identifier prefix and the postMessage message types. An instance describes which pages have a row of their own in a given navigation index and builds the markup a page uses to embed the shared document.

Topics

Relationships

  • Swift.Equatable
  • Swift.Sendable
  • Swift.SendableMetatype