Skip Navigation
Type MethodMethod

topicMarkup(for:pageStatuses:)

Returns the badge of a topic in a topic list (swift-docc-render’s TopicsLinkBlock).

static func topicMarkup(
    for reference: TopicRenderReference,
    pageStatuses: Set<Variant>
) -> String

Parameters

reference

The topic reference.

pageStatuses

The statuses of the page that lists the topic.

Return Value

The badge markup, or an empty string.

Discussion

A deprecated topic shows a badge unless the listing page is deprecated itself; otherwise a beta topic shows one unless the listing page is beta.