Type MethodMethodtopic
topicMarkup(for:pageStatuses:)
Returns the badge of a topic in a topic list (swift-docc-render’s Topics).
static func topicMarkup(
for reference: TopicRenderReference ,
pageStatuses: Set<Variant>
) -> StringParameters
referenceThe topic reference.
pageStatusesThe 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.