Skip Navigation
Type MethodMethod

headerAnchor(anchor:title:)

Builds the link that makes a heading an anchor (swift-docc-render’s LinkableHeading).

static func headerAnchor(
    anchor: String,
    title: String
) -> String

Parameters

anchor

The identifier of the heading.

title

The heading text, already escaped for HTML.

Return Value

The a.header-anchor element.

Discussion

The link icon after the title appears while the heading is hovered or focused.