From 0a5f4b7ba4443294fbbe3f60b62e746663f3cf42 Mon Sep 17 00:00:00 2001 From: Norio Nomura Date: Tue, 18 Dec 2018 18:31:55 +0900 Subject: [PATCH] Pass `--module-version` and `--root-url` parameters to `jazzy` (#700) * Pass `--module-version` and `--root-url` parameters to `jazzy` ### Motivation: It would be good if the API document was distributed as a docset that can be installed in Dash, like [Yams](https://www.jpsim.com/Yams/). ### Modifications: Pass `--module-version` and `--root-url` parameters to `jazzy`. ### Result: Jazzy generates docsets and add "Install in Dash" link to `index.html`. * Apply review: Avoid appending `args` --- scripts/generate_docs.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/generate_docs.sh b/scripts/generate_docs.sh index 9abf0f7658..c772f8d6bc 100755 --- a/scripts/generate_docs.sh +++ b/scripts/generate_docs.sh @@ -71,7 +71,9 @@ for module in "${modules[@]}"; do done for module in "${modules[@]}"; do - args=("${jazzy_args[@]}" --output "$root_path/docs/$version/$module" --module "$module") + args=("${jazzy_args[@]}" --output "$root_path/docs/$version/$module" --module "$module" + --module-version $version + --root-url "https://apple.github.io/swift-nio/docs/$version/$module") if [[ -f "$root_path/.build/sourcekitten/$module.json" ]]; then args+=(--sourcekitten-sourcefile "$root_path/.build/sourcekitten/$module.json") fi