Skip to content

Commit 1ac0195

Browse files
committed
[PEM] Rewrite module documentation
1 parent eaa5b20 commit 1ac0195

File tree

7 files changed

+32
-65
lines changed

7 files changed

+32
-65
lines changed

build-logic/src/main/kotlin/ckbuild/docs.kt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,14 @@ fun DokkaExtension.registerKotlinxIoExternalDocumentation() {
99
}
1010
}
1111
}
12+
13+
14+
fun DokkaExtension.includeCommonDocs() {
15+
dokkaSourceSets.configureEach {
16+
if (name.endsWith("Main")) {
17+
// TODO: dokka requires for `includes` files to be present...
18+
// otherwise we could use `includes.from("src/${name}Docs/module.md")`
19+
includes.from("src/commonDocs/module.md")
20+
}
21+
}
22+
}

cryptography-serialization/pem/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,6 @@ kover {
3232
}
3333

3434
dokka {
35+
includeCommonDocs()
3536
registerKotlinxIoExternalDocumentation()
3637
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Module cryptography-serialization-pem
2+
3+
Provides PEM encoding/decoding support as defined by [RFC 7468](https://datatracker.ietf.org/doc/html/rfc7468)
4+
5+
The module exposes two main types:
6+
7+
- [PemLabel][PemLabel] – a case-sensitive encapsulation label.
8+
- [PemDocument][PemDocument] – an immutable value object representing a single PEM document with a label and binary content.
9+
10+
#### [Get complete dependency details at klibs.io](https://klibs.io/package/dev.whyoleg.cryptography/cryptography-serialization-pem)
11+
12+
[PemDocument]: https://whyoleg.github.io/cryptography-kotlin/api/cryptography-serialization-pem/dev.whyoleg.cryptography.serialization.pem/-pem-document/index.html
13+
14+
[PemLabel]: https://whyoleg.github.io/cryptography-kotlin/api/cryptography-serialization-pem/dev.whyoleg.cryptography.serialization.pem/-pem-label/index.html
15+
16+
# Package dev.whyoleg.cryptography.serialization.pem
17+
18+
Provides PEM encoding/decoding support as defined by [RFC 7468](https://datatracker.ietf.org/doc/html/rfc7468)

docs/serialization/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
At this moment the library provides separate independent modules to work with different cryptography-related serialization formats:
44

5-
* [PEM](pem.md)
5+
* [PEM](../api/cryptography-serialization-pem/index.html)
66
* [ASN.1/DER](asn1.md)
77

88
Support for [JOSE](https://github.com/whyoleg/cryptography-kotlin/issues/16)

docs/serialization/pem.md

Lines changed: 0 additions & 43 deletions
This file was deleted.

dokka/modules.md

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -106,26 +106,6 @@ Provides API for working with keys: [encoding][EncodableKey], [decoding][KeyDeco
106106

107107
[KeyGenerator]: https://whyoleg.github.io/cryptography-kotlin/api/cryptography-core/dev.whyoleg.cryptography.materials.key/-key-generator/index.html
108108

109-
# Module cryptography-serialization-pem
110-
111-
[PEM][PEM]: encoding/decoding of PEM content from/to [String][String] or [ByteArray][ByteArray]
112-
113-
[PEM]: https://whyoleg.github.io/cryptography-kotlin/api/cryptography-serialization-pem/dev.whyoleg.cryptography.serialization.pem/-pem-document/index.html
114-
115-
[String]: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/
116-
117-
[ByteArray]: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte-array/
118-
119-
# Package dev.whyoleg.cryptography.serialization.pem
120-
121-
[PEM][PEM]: encoding/decoding of PEM files from/to [String][String] or [ByteArray][ByteArray]
122-
123-
[PEM]: https://whyoleg.github.io/cryptography-kotlin/api/cryptography-serialization-pem/dev.whyoleg.cryptography.serialization.pem/-pem-document/index.html
124-
125-
[String]: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/
126-
127-
[ByteArray]: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte-array/
128-
129109
# Module cryptography-serialization-asn1
130110

131111
ASN.1/[DER][DER]: binary serialization of ASN.1/DER content via [kotlinx.serialization][kotlinx.serialization]

mkdocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ nav:
4040
- 'OpenSSL3': providers/openssl3.md
4141
- 'Serialization':
4242
- serialization/index.md
43-
- 'PEM': serialization/pem.md
4443
- 'ASN.1/DER': serialization/asn1.md
44+
- 'PEM': api/cryptography-serialization-pem/index.html
4545
- 'API': api/index.html
4646

4747
theme:

0 commit comments

Comments
 (0)