Documentation Language: Swift

Framework

Static Documentation Plugin

A Swift Package Manager plugin for generating static documentation using DocC.

Overview

The plugin integrates with Swift Package Manager to generate static HTML/CSS documentation directly from your package. It expands the swift package command with a subcommand generate-static-documentation that renders pure HTML/CSS documentation.

Setup

Add swift-docc-static as a dependency in your Package.swift:

dependencies: [
    .package(url: "https://github.com/mipalgu/swift-docc-static.git", branch: "main"),
]

No additional configuration is needed - the plugin is automatically available.

Usage

Run the plugin from your package directory:

swift package generate-static-documentation

For faster builds, use a custom scratch path:

swift package --scratch-path /tmp/build generate-static-documentation

Output

The plugin generates documentation in .build/documentation by default. Open index.html in a browser to view the documentation:

open .build/documentation/index.html

Features

Topics

Essentials

A
Getting Started with the Plugin

Add the SPM plugin to your package for integrated documentation generation.

A
Plugin Options

Configure documentation generation with command-line options.

Integration

A
Xcode Integration

Generate static documentation from Xcode projects and workspaces.