-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: stop including playground.js in Dokka pages and correctly filter…
… for internal APIs (#1404)
- Loading branch information
Showing
3 changed files
with
43 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
dokka-aws/src/main/kotlin/aws/sdk/kotlin/dokka/transformers/DisablePlaygroundIntegration.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/* | ||
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
package aws.sdk.kotlin.dokka.transformers | ||
|
||
import org.jetbrains.dokka.pages.RootPageNode | ||
import org.jetbrains.dokka.plugability.DokkaContext | ||
import org.jetbrains.dokka.transformers.pages.PageTransformer | ||
|
||
@Suppress("UNUSED_PARAMETER") // `context` is required by the `provides` DSL method for installing transformers | ||
class DisablePlaygroundIntegration(context: DokkaContext) : PageTransformer { | ||
override fun invoke(input: RootPageNode) = input.transformContentPagesTree { page -> | ||
page.modified( | ||
content = page.content, | ||
embeddedResources = page.embeddedResources.filterNot { "unpkg.com" in it }, | ||
) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters