StructureStructureDoc
DocLinkPostProcessor
Post-processes generated HTML to resolve doc:// URLs into proper links.
struct DocLinkPostProcessorOverview
This processor scans HTML content for unresolved doc:// URLs and replaces them with proper <a href="..."> links based on:
-
Cross-target links within the same package (relative links)
-
Included dependencies (relative links)
-
External documentation URL mappings (absolute links)
A link to a page of a documented module that is not generated is left as text, unless the page resolver knows external documentation for it.
Topics
let documentedModules : [String : String] documentedKnown modules being documented (for cross-target resolution). Maps module name to its bundle identifier.
let externalURLs : [String : URL] externalExternal documentation URL mappings (bundle ID -> base URL).
let pageLinkResolver : PageLinkResolver pageDecides whether pages are generated and where links to other pages point.
func process(String, currentDepth : Int) -> String process(_:Processes HTML content, replacing
doc:// URLs with proper links.static func shouldProcess (relativePath : String) -> Bool shouldReturns whether a generated HTML file needs doc link post-processing.
Relationships
Swift.Sendable Swift.Sendable Metatype
See Also
struct PageLinkResolver PageDecides where links to documentation pages point.
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.