You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: README updates.
- Moved build instructions to CONTRIBUTING.md
- Added DocC help command to the README
- Moved technical and related projects info from README to CONTRIBUTING
- Updated year in DocC footer for CONTRIBUTING.md and README.md
rdar://114318669
and publishing your documentation to your [website](https://apple.github.io/swift-docc-plugin/documentation/swiftdoccplugin/generating-documentation-for-hosting-online) or [GitHub Pages](https://apple.github.io/swift-docc-plugin/documentation/swiftdoccplugin/publishing-to-github-pages).
136
35
137
-
1. Select the project in the Project Navigator.
138
-
139
-
2. In the Build Settings tab, click '+' and then'Add User-Defined Setting'.
140
-
141
-
3. Create a build setting `DOCC_EXEC` with the value set to `/path/to/docc`.
36
+
**2. For standalone documentation:**
142
37
143
-
The next time you invoke a documentation build with the "Build Documentation"
144
-
button in Xcode's Product menu, your custom `docc` will be used for the build.
145
-
You can confirm that your custom `docc` is being used by opening the latest build
146
-
log in Xcode's report navigator and expanding the "Compile documentation" step.
38
+
If you have Xcode installed, it's recommended to generate documentation using the `xcrun` command.
39
+
You can get DocC working by invoking `xcrun docc` in your terminal.
147
40
148
-
### Invoking `docc` from Swift Package Manager
41
+
Swift-DocC is also included in the Swift toolchain for both macOS and Linux.
149
42
150
-
You can also test a locally built version of Swift-DocC using the Swift Package
151
-
Manager from the command line. The Swift-DocC SwiftPM plugin will try to read
152
-
`DOCC_EXEC` environment variable value, and use the path you provded if it's set.
43
+
To see instructions on how to use DocC from the CLI run
44
+
```
45
+
docc --help
46
+
```
153
47
154
-
1. In your project's `Package.swift`, add a dependency on the [`Swift-DocC Plugin`](https://github.com/apple/swift-docc-plugin).
155
-
2. Set the `DOCC_EXEC` environment variable and run the documentation generation
156
-
command:
48
+
**3. For documenting apps, frameworks, and packages using Xcode:**
157
49
158
-
```bash
159
-
DOCC_EXEC=/path/to/docc swift package generate-documentation
160
-
```
50
+
If you want to generate an API reference for your project you can use DocC via Xcode.
51
+
Please refer to the Xcode [documentation](https://developer.apple.com/documentation/xcode/writing-documentation)
52
+
to learn the essentials of how to get started.
161
53
162
-
## Using `docc` to build and preview documentation
54
+
## Writing and Publishing Documentation with Swift-DocC
163
55
164
-
The preferred way of building documentation for your Swift package is by using
165
-
the Swift-DocC Plugin, or if you're using Xcode, using the "Build Documentation" command.
56
+
If you want to learn how to write and format your documentation please refer to
57
+
[Formatting Your Documentation Content](https://www.swift.org/documentation/docc/formatting-your-documentation-content).
58
+
For publishing go to [Distributing Documentation to Other Developers](https://www.swift.org/documentation/docc/distributing-documentation-to-other-developers).
to get started with [building](https://apple.github.io/swift-docc-plugin/documentation/swiftdoccplugin/generating-documentation-for-a-specific-target), [previewing](https://apple.github.io/swift-docc-plugin/documentation/swiftdoccplugin/previewing-documentation),
170
-
and publishing your documentation to your [website](https://apple.github.io/swift-docc-plugin/documentation/swiftdoccplugin/generating-documentation-for-hosting-online) or [GitHub Pages](https://apple.github.io/swift-docc-plugin/documentation/swiftdoccplugin/publishing-to-github-pages).
60
+
To learn more about how Swift-DocC works internally please see [CONTRIBUTING.md](CONTRIBUTING.md).
171
61
172
-
Alternatively, you can manually generate symbol graph files and invoke `docc` directly.
173
-
Refer to instructions in [CONTRIBUTING.md](/CONTRIBUTING.md#assembling-symbol-graphs-and-building-with-docc-directly).
174
-
175
62
## Versioning
176
63
177
-
Swift-DocC's CLI tool (`docc`) will be integrated into the Swift toolchain
64
+
Swift-DocC's CLI tool (`docc`) is integrated into the Swift toolchain
178
65
and follows the Swift compiler's versioning scheme.
179
66
180
67
The `SwiftDocC` library is versioned separately from `docc`. `SwiftDocC` is under
@@ -200,7 +87,7 @@ and provide as many details as possible.
200
87
201
88
If you can confirm that the bug occurs when using the latest commit of Swift-DocC
202
89
from the `main` branch (see [Building Swift-DocC](/CONTRIBUTING.md#building-swift-docc)),
203
-
that will help us track down the bug faster.
90
+
it will help us track down the bug faster..
204
91
205
92
### Submitting a Feature Request
206
93
@@ -217,6 +104,11 @@ before being enabled by default.
217
104
218
105
## Contributing to Swift-DocC
219
106
220
-
Please see the [contributing guide](/CONTRIBUTING.md) for more information.
107
+
The [Swift Forums](https://forums.swift.org/c/development/swift-docc) are
108
+
the best place to get help with Swift-DocC and discuss future plans.
109
+
110
+
As an open-source project, we value any contribution made to this tool.
111
+
Please see the [contributing guide](/CONTRIBUTING.md) for more information on how to
112
+
contribute and build DocC from source.
221
113
222
-
<!-- Copyright (c) 2021-2022 Apple Inc and the Swift Project authors. All Rights Reserved. -->
114
+
<!-- Copyright (c) 2021-2023 Apple Inc and the Swift Project authors. All Rights Reserved. -->
0 commit comments