Skip to content

Commit fbea249

Browse files
authored
SWIFT-854 Add custom docs sections (#46)
1 parent afa61b5 commit fbea249

File tree

4 files changed

+53
-18
lines changed

4 files changed

+53
-18
lines changed

.jazzy.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
module: SwiftBSON
2+
author: Neal Beeken, Nellie Spektor, Patrick Freed, and Kaitlin Mahar
3+
author_url: https://github.com/mongodb/swift-bson
4+
github_url: https://github.com/mongodb/swift-bson
5+
theme: fullwidth
6+
swift_build_tool: spm
7+
readme: "etc/docs-main.md"
8+
root_url: https://mongodb.github.io/swift-bson/docs/SwiftBSON/
9+
documentation: "Guides/*.md"
10+
11+
custom_categories:
12+
- name: General Guides
13+
children:
14+
- BSON-Guide
15+
- JSON-Interop
16+
- name: BSON Types
17+
children:
18+
- BSON
19+
- BSONType
20+
- BSONBinary
21+
- BSONCode
22+
- BSONCodeWithScope
23+
- BSONDBPointer
24+
- BSONDecimal128
25+
- BSONDocument
26+
- BSONObjectID
27+
- BSONRegularExpression
28+
- BSONSymbol
29+
- BSONTimestamp
30+
- name: Encoding and Decoding BSON
31+
children:
32+
- BSONEncoder
33+
- BSONDecoder
34+
- DataCodingStrategy
35+
- DateCodingStrategy
36+
- UUIDCodingStrategy
37+
- CodingStrategyProvider
38+
- BSONCoderOptions
39+
- name: Encoding and Decoding Extended JSON
40+
children:
41+
- ExtendedJSONEncoder
42+
- ExtendedJSONDecoder
43+
- name: Errors
44+
children:
45+
- BSONError
46+
- BSONErrorProtocol
47+
File renamed without changes.

Sources/SwiftBSON/BSONDocumentIterator.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import Foundation
22
import NIO
33

4+
/// :nodoc:
45
/// Iterator over a `BSONDocument`. This type is not meant to be used directly; please use `Sequence` protocol methods
56
/// instead.
67
public class BSONDocumentIterator: IteratorProtocol {

etc/generate-docs.sh

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -14,24 +14,11 @@ version=${1}
1414
# Ensure version is non-empty
1515
[ ! -z "${version}" ] || { echo "ERROR: Missing version string"; exit 1; }
1616

17-
jazzy_args=(--clean
18-
--author "Neal Beeken, Nellie Spektor, Patrick Freed, and Kaitlin Mahar"
19-
--readme "etc/docs-main.md"
20-
--author_url https://github.com/mongodb/swift-bson
21-
--github_url https://github.com/mongodb/swift-bson
22-
--theme fullwidth
23-
--documentation "Guides/*.md"
24-
--github-file-prefix https://github.com/mongodb/swift-bson/tree/v${version}
25-
--module-version "${version}"
26-
--swift-build-tool spm)
27-
28-
modules=( BSON )
29-
30-
for module in "${modules[@]}"; do
31-
args=("${jazzy_args[@]}" --output "docs-temp/${module}" --module "${module}"
32-
--root-url "https://mongodb.github.io/swift-bson/docs/${module}/")
33-
jazzy "${args[@]}"
34-
done
17+
jazzy \
18+
--github-file-prefix https://github.com/mongodb/swift-bson/tree/v${version} \
19+
--module-version "${version}" \
20+
--output "docs-temp/SwiftBSON" \
21+
--config .jazzy.yml
3522

3623
# switch to docs branch to commit and push
3724
git stash

0 commit comments

Comments
 (0)