File tree Expand file tree Collapse file tree 2 files changed +30
-21
lines changed Expand file tree Collapse file tree 2 files changed +30
-21
lines changed Original file line number Diff line number Diff line change @@ -159,24 +159,3 @@ view of the available documentation. In particular, the documents titled
159
159
[ Debugging the Swift Compiler] ( docs/DebuggingTheCompiler.md ) and
160
160
[ Continuous Integration for Swift] ( docs/ContinuousIntegration.md ) are very
161
161
helpful to understand before submitting your first PR.
162
-
163
- ### Building Documentation
164
-
165
- To read the compiler documentation, start by installing the
166
- [ Sphinx] ( http://sphinx-doc.org ) documentation generator tool by running the
167
- command:
168
-
169
- easy_install -U "Sphinx < 2.0"
170
-
171
- Once complete, you can build the Swift documentation by changing directory into
172
- [ docs] ( https://github.com/apple/swift/tree/master/docs ) and typing ` make ` . This
173
- compiles the ` .rst ` files in the [ docs] ( https://github.com/apple/swift/tree/master/docs )
174
- directory into HTML in the ` docs/_build/html ` directory.
175
-
176
- Many of the docs are out of date, but you can see some historical design
177
- documents in the ` docs ` directory.
178
-
179
- Another source of documentation is the standard library itself, located in
180
- ` stdlib ` . Much of the language is actually implemented in the library
181
- (including ` Int ` ), and the standard library gives some examples of what can be
182
- expressed today.
Original file line number Diff line number Diff line change @@ -68,6 +68,36 @@ This very depends on what X is, but some broad guidelines are:
68
68
- Use ` grep -i -r "mypattern" . ` .
69
69
2 . Go through the [ Documentation Index] ( /docs/README.md ) .
70
70
71
+ ### How do I build the documentation as HTML?
72
+
73
+ You can build the ReST formatted documentation as HTML using Sphinx. Follow
74
+ [ Sphinx's installation instructions] [ ] and check that ` sphinx-build ` is
75
+ available on your ` PATH ` :
76
+
77
+ [ Sphinx's installation instructions ] : https://www.sphinx-doc.org/en/master/usage/installation.html
78
+
79
+ ``` sh
80
+ sphinx-build --version
81
+ ```
82
+
83
+ If that succeeds, you can build the documentation using ` make `
84
+
85
+ ``` sh
86
+ make -C docs
87
+ ```
88
+
89
+ (Tested with ` sphinx-build ` version 3.2.1.)
90
+
91
+ This compiles the ` .rst ` files in the ` docs ` directory into HTML in the
92
+ ` docs/_build/html ` directory.
93
+
94
+ For the Markdown documentation, you can view the rendered HTML directly on
95
+ GitHub. For example, this file is rendered on GitHub at
96
+ https://github.com/apple/swift/tree/master/docs/HowToGuides/FAQ.md .
97
+
98
+ HTML documentation for the standard library on Darwin platforms is hosted on the
99
+ [ Apple Developer website] ( https://developer.apple.com/documentation/swift/swift_standard_library ) .
100
+
71
101
## Pull Request Workflow
72
102
73
103
### How do I format my changes?
You can’t perform that action at this time.
0 commit comments