DocC comes with built-in support for several types of input files. You group these files by placing them in a folder with a .docc extension. This folder is called a documentation catalog, and can include these file types:
-
Lightweight markdown files that contain free-form articles or additional symbol documentation, with an .md extension.
-
Tutorial files that include dynamic learning content, with a .tutorial extension.
-
Asset files like images, videos, and archived projects for download, with known extensions like .png, .jpg, .mov, and .zip.
-
Symbol-graph files that describe the symbols of your API, with an .symbols.json extension.
-
An Info.plist file with optional metadata about the documentation.
-
A theme-settings.json with theming customizations for the rendered output.
SwiftDocC provides the APIs you use to discover documentation inputs, load catalog content, parse the symbol-graph meta-information, extract symbol documentation, and pair that symbol documentation with external file content. DocC represents the compiled documentation in an in-memory model that you can further convert in a persistable representation for writing to disk.
Converting in-memory documentation into rendering nodes and persisting them on disk as JSON.
-
class CustomMetadata
A directive that accepts an arbitrary key/value pair and emits it into the metadata of the page
-
class DiagnosticConsoleWriter
Writes diagnostic messages to a text output stream.
-
class DiagnosticFileWriter
A diagnostic consumer that writes detailed diagnostic information to a file.
-
class DocumentationContentRenderer
A collection of functions that render a piece of documentation content.
-
class DocumentationContextConverter
A converter from documentation nodes to render nodes.
-
class DocumentationServer
A server that provides documentation-related services.
-
class LinkResolver
A class that resolves documentation links by orchestrating calls to other link resolver implementations.
-
class Links
A directive for authoring authoring embedded previews of documentation links (similar to how links are currently rendered in Topics sections) anywhere on the page without affecting page curation behavior.
-
class Options
A directive to adjust Swift-DocC’s default behaviors when rendering a page.
-
class Row
A container directive that arranges content into a grid-based row and column layout.
-
class Small
A directive for specifying small print text like legal, license, or copyright text that should be rendered in a smaller font size.
-
class Snippet
Embeds a code example from the project’s code snippets.
-
class Synchronized
A wrapper type that ensures a synchronous access to a value.
-
class TabNavigator
A container directive that arranges content into a tab-based layout.