Skip to content

Commit 3c612cc

Browse files
dpassagethomasvl
authored andcommitted
Customize Jazzy documentation generation (apple#218)
* Add a makefile step for building documentation. * Also add the `Documentation` files to the output. * Remove the developer-oriented guides from the site * Add link to generated documentation on cocoadocs.org
1 parent d179324 commit 3c612cc

File tree

4 files changed

+15
-0
lines changed

4 files changed

+15
-0
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ xcuserdata
66
xcbaselines
77
/_test
88
protoc-gen-swift
9+
/docs
10+
/build
911

1012
# Intermediate conformance test outputs
1113
failing_tests.txt

.jazzy.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
documentation: "Documentation/{API,GENERATED_CODE,PLUGIN}.md"

Makefile

+10
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ endif
178178
clean \
179179
conformance-host \
180180
default \
181+
docs \
181182
install \
182183
reference \
183184
regenerate \
@@ -259,6 +260,15 @@ clean:
259260
rm -rf .build _test ${PROTOC_GEN_SWIFT}
260261
find . -name '*~' | xargs rm
261262

263+
# Build a local copy of the API documentation, using the same process used
264+
# by cocoadocs.org.
265+
docs:
266+
@if which jazzy >/dev/null; then \
267+
jazzy; \
268+
else \
269+
echo "Jazzy not installed, use 'gem install jazzy' or download from https://github.com/realm/jazzy"; \
270+
fi
271+
262272
#
263273
# Test the runtime and the plugin
264274
#

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ More information is available in the associated documentation:
3535
* [STYLE_GUIDELINES.md](Documentation/STYLE_GUIDELINES.md) documents the style
3636
guidelines we have adopted in our codebase if you are interested in
3737
contributing
38+
* [cocoapods.org](http://cocoadocs.org/docsets/SwiftProtobuf/) has the latest
39+
full API documentation
3840

3941
## Getting Started
4042

0 commit comments

Comments
 (0)