Skip Navigation
Instance MethodMethod

embeddingMarkup(forPagePath:depth:)

Builds the sidebar container that embeds the shared document in a page.

func embeddingMarkup(
    forPagePath path: String,
    depth: Int
) -> String

Parameters

path

The documentation path of the page.

depth

The number of directories between the output root and the page.

Return Value

The HTML for the sidebar container.

Discussion

The container mirrors swift-docc-render’s adjustable sidebar (.sidebar > .aside > .documentation-layout-aside). Above the embedded document it holds the heading and close button that the navigator shows when it opens as a full-screen overlay on narrow viewports; the close button is a label for the page’s navigator toggle (sidebarToggleIdentifier).