File: DocC%20Documentation.md

package info (click to toggle)
swiftlang 6.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,519,992 kB
  • sloc: cpp: 9,107,863; ansic: 2,040,022; asm: 1,135,751; python: 296,500; objc: 82,456; f90: 60,502; lisp: 34,951; pascal: 19,946; sh: 18,133; perl: 7,482; ml: 4,937; javascript: 4,117; makefile: 3,840; awk: 3,535; xml: 914; fortran: 619; cs: 573; ruby: 573
file content (51 lines) | stat: -rw-r--r-- 2,165 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# ``docc``

@Metadata {
    @DisplayName("DocC")
}

Produce rich API reference documentation and interactive tutorials for your Swift framework or package.

## Overview

The DocC documentation compiler converts Markdown-based text into rich documentation for Swift frameworks and packages. You can preview the documentation in its published form as you work on it, and also host it on a website when it's complete.

DocC syntax — called _documentation markup_ — is a custom variant of Markdown that adds functionality for developer-specific documentation features, like cross-symbol linking, term-definition lists, code listings, and asides. You add documentation markup to your source code, compile it with DocC, and produce reference documentation for your APIs. You can also use documentation markup, along with a set of directives that instruct how DocC generates your content, to offer step-by-step tutorials that teach developers to use your APIs through interactive coding exercises or to craft comprehensive articles that explain specific technologies or topics.

![On the left, a diagram shows a blocked-out example of a compiled tutorial and Markdown. In the middle, a diagram shows a blocked-out example of Markdown. On the right, a diagram shows a blocked-out example of compiled developer documentation.](docc-hero)

## Topics

### Essentials

- <doc:documenting-a-swift-framework-or-package>

### Documentation Content

- <doc:writing-symbol-documentation-in-your-source-files>
- <doc:adding-supplemental-content-to-a-documentation-catalog>
- <doc:linking-to-symbols-and-other-content>

### Structure and Formatting

- <doc:formatting-your-documentation-content>
- <doc:adding-tables-of-data>
- <doc:other-formatting-options>
- <doc:adding-images>
- <doc:adding-structure-to-your-documentation-pages>
- <doc:customizing-the-appearance-of-your-documentation-pages>

### Distribution

- <doc:distributing-documentation-to-other-developers>

### Documentation Types

- <doc:api-reference-syntax>
- <doc:tutorial-syntax>

### Shared Syntax

- ``Comment``

<!-- Copyright (c) 2021-2024 Apple Inc and the Swift Project authors. All Rights Reserved. -->