-
Notifications
You must be signed in to change notification settings - Fork 26
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
- Loading branch information
Showing
3 changed files
with
41 additions
and
17 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
dokka-smithy/src/main/kotlin/aws/smithy/kotlin/dokka/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.smithy.kotlin.dokka | ||
|
||
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
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