Swift DocC Documentation Tool
Article Summary
Franklin Schrans from Apple's Swift-DocC team just announced something iOS developers have been waiting for: Swift-DocC is now open source and cross-platform. Documentation just got a serious upgrade.
Apple's new documentation compiler, announced at WWDC21 and shipped with Xcode 13, is now available as open source with support for macOS and Linux. Swift-DocC lets developers write API docs, long-form articles, and interactive tutorials all alongside their code, then generates beautiful documentation websites automatically.
Key Takeaways
- Four open source components: compiler, web renderer, Markdown parser, and SymbolKit library
- Double-backtick syntax creates validated links between symbols automatically
- Supports API docs, Markdown articles, and step-by-step tutorials in one workflow
- Coming to Swift Package Manager via extensible plugins through Swift Evolution
- Works with existing Swift doc comment syntax from Jazzy and SwiftDoc
Swift-DocC brings Apple-quality documentation tooling to the entire Swift ecosystem, making it as easy to build docs as it is to build code.
About This Article
Developers used to write high-level educational content separately from API documentation. This split meant the educational material was less likely to get written in the first place and would fall out of date quickly.
Franklin Schrans' team created Swift-DocC to let developers write high-level content right alongside their code. The tool makes it easy to link between API and conceptual docs in a single workflow.
Swift-DocC works with multiple build systems like SwiftPM and comes built into Xcode 13. This makes it straightforward to generate documentation on both macOS and Linux.