Prechádzať zdrojové kódy

Customize Jazzy documentation generation (#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
David Paschich 9 rokov pred
rodič
commit
3c612cc7ec
4 zmenil súbory, kde vykonal 15 pridanie a 0 odobranie
  1. 2 0
      .gitignore
  2. 1 0
      .jazzy.yaml
  3. 10 0
      Makefile
  4. 2 0
      README.md

+ 2 - 0
.gitignore

@@ -6,6 +6,8 @@ xcuserdata
 xcbaselines
 /_test
 protoc-gen-swift
+/docs
+/build
 
 # Intermediate conformance test outputs
 failing_tests.txt

+ 1 - 0
.jazzy.yaml

@@ -0,0 +1 @@
+documentation: "Documentation/{API,GENERATED_CODE,PLUGIN}.md"

+ 10 - 0
Makefile

@@ -178,6 +178,7 @@ endif
 	clean \
 	conformance-host \
 	default \
+	docs \
 	install \
 	reference \
 	regenerate \
@@ -259,6 +260,15 @@ clean:
 	rm -rf .build _test ${PROTOC_GEN_SWIFT}
 	find . -name '*~' | xargs rm
 
+# Build a local copy of the API documentation, using the same process used
+# by cocoadocs.org.
+docs:
+	@if which jazzy >/dev/null; then \
+		jazzy; \
+	else \
+		echo "Jazzy not installed, use 'gem install jazzy' or download from https://github.com/realm/jazzy"; \
+	fi
+
 #
 # Test the runtime and the plugin
 #

+ 2 - 0
README.md

@@ -35,6 +35,8 @@ More information is available in the associated documentation:
  * [STYLE_GUIDELINES.md](Documentation/STYLE_GUIDELINES.md) documents the style
    guidelines we have adopted in our codebase if you are interested in
    contributing
+ * [cocoapods.org](http://cocoadocs.org/docsets/SwiftProtobuf/) has the latest
+   full API documentation
 
 ## Getting Started