Skip to content

Commit 150216e

Browse files
authored
Add 'Show on GitHub' link to API docs (AsyncHttpClient#17)
Motivation: Allowing readers of the API documentation to drill into the implementation of documented declarations can be educational and helpful for debugging, among several other reasons. Modifications: Add --github-file-prefix appending the current version in order to keep stable links. This means that documentation generated from any non-release revision may resolve incorrectly. This can be refined in the doc generation script later if it is deemed problematic by resolving to the commit sha if it doesn't exactly align with the version. Result: Users will be able to click a 'Show on GitHub' for all documented API declarations.
1 parent 1d902e4 commit 150216e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

scripts/generate_docs.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ jazzy_args=(--clean
5757
--readme "$module_switcher"
5858
--author_url https://github.com/swift-server/swift-nio-http-client
5959
--github_url https://github.com/swift-server/swift-nio-http-client
60+
--github-file-prefix https://github.com/swift-server/swift-nio-http-client/tree/$version
6061
--theme fullwidth
6162
--xcodebuild-arguments -scheme,swift-nio-http-client-Package)
6263
cat > "$module_switcher" <<"EOF"

0 commit comments

Comments
 (0)