StructureStructurePage
PageLinkResolver
Decides where links to documentation pages point.
struct PageLinkResolverOverview
A link to a page of the generated site is a relative link to the page’s index file. A link to a page that the site does not contain, such as a symbol of a dependency that is not documented, points to the page in the module’s hosted documentation if External knows it; otherwise there is no destination and the reference is shown as unlinked text, like swift-docc-render shows references it cannot resolve.
Topics
let externalDocumentation : ExternalDocumentation externalThe hosted documentation of modules outside the generated site.
let generatedPagePaths : Set<String>? generatedThe normalised paths (see
pagePathKey(_:) ) of the pages of the generated site, or nil if every documentation page is assumed to be generated.func destination(forPage : String, depth: Int) -> String? destination(forReturns the destination of a link to a page.
func isGenerated (String) -> Bool isReturns whether a page is part of the generated site.
static let pageFileName : String pageThe name of the file that holds each generated page in its directory.
static let unrestricted: PageLinkResolver unrestrictedA resolver that assumes every documentation page is generated.
static func isAbsoluteOrLocal (String) -> Bool isReturns whether a URL has a scheme or only refers to a fragment of the current page, so that it needs no resolution.
static func qualifiedSymbolName (ofIdentifier : String) -> String? qualifiedReturns the qualified name of a symbol, such as
Module.Type , from its reference.static func relativePageURL (String, depth: Int) -> String relativeReturns a relative link to a generated page.
static func symbolPathComponents (ofIdentifier : String) -> [String]? symbolReturns the path of a symbol below the documentation root, from its reference.
Relationships
Swift.Sendable Swift.Sendable Metatype
See Also
struct ExternalDocumentation ExternalThe hosted documentation of modules that are not part of the generated site.
struct PackageModules PackageA package and the names of the modules it provides.
struct PackageDependency PackageA package dependency as listed by the Swift Package Manager.
struct DocLinkPostProcessor DocPost-processes generated HTML to resolve
doc:// URLs into proper links.