Type MethodMethodreference
referenceMarkup(for:additionalClass:)
Builds the icon of a topic type like markup(for:, but referring to a drawing defined once in the document.
static func referenceMarkup(
for type: String,
additionalClass: String = ""
) -> StringParameters
typeA type name; it is normalised with
normalised.Type(_:) additionalClassFurther classes of the wrapper, such as
navigator-icon.
Return Value
A <span> with the class class holding the referring icon.
Discussion
The icon keeps the wrapper and the classes of swift-docc-render’s icon, whose size the stylesheet sets, and draws its content with a <use> element that refers to the drawing symbol defines for the type, with the icon’s view box. A document that lists many topics then holds each drawing only once.