Skip to content

Commit

Permalink
Customize KDoc (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
nedtwigg authored Oct 12, 2023
2 parents 060bd31 + da8e7e5 commit d8b7400
Show file tree
Hide file tree
Showing 20 changed files with 1,037 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
.gradle/
build/
bin/
.DS_Store
28 changes: 28 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,31 @@ repositories {
mavenCentral()
}
apply from: rootProject.file('gradle/spotless.gradle')

// ./gradlew :dokkatooGeneratePublicationHtml
// https://github.com/Kotlin/dokka/issues/3131
// if IntelliJ is running, then you'll also get a localhost server link
def HAS_DOCS = [
'selfie-lib',
'selfie-runner-junit5'
]
subprojects {
if (name in HAS_DOCS) {
apply from: rootProject.file("gradle/dokka/dokkatoo.gradle")
}
}
apply from: rootProject.file("gradle/dokka/dokkatoo.gradle")
dependencies {
// aggregate both subproject-hello and subproject-world
// the subprojects must also have Dokkatoo applied
for (p in HAS_DOCS) {
dokkatoo(project(":${p}"))
}

// This is required at the moment, see https://github.com/adamko-dev/dokkatoo/issues/14
dokkatooPluginHtml(
dokkatoo.versions.jetbrainsDokka.map { dokkaVersion ->
"org.jetbrains.dokka:all-modules-page-plugin:$dokkaVersion"
}
)
}
197 changes: 197 additions & 0 deletions docs/public/logo-icon-large.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
186 changes: 186 additions & 0 deletions docs/public/logo-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions docs/src/pages/_document.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ export default function Document() {
href="https://fonts.googleapis.com/css2?family=Bagel+Fat+One&family=Jost:ital,wght@0,400;0,700;1,400&display=swap"
rel="stylesheet"
/>
<link
href="/logo-icon.svg"
rel="icon"
type="image/svg"
sizes="32x32"
></link>
</Head>
<body>
<div className="flex justify-center text-black antialiased">
Expand Down
9 changes: 9 additions & 0 deletions gradle/dokka/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Main info is available at https://kotlinlang.org/docs/dokka-html.html

But the gist is that [this folder](https://github.com/Kotlin/dokka/tree/master/plugins/base/src/main/resources/dokka) has

- images (mainly `logo-icon.svg`)
- styles (`style.css`, `prism.css` (syntax highlighting), `logo-styles.css`)
- templates (`base.ftl`, `header.ftl`, `footer.ftl`)

And we can override any of them in the root `build.gradle` inside the `dokkatoo` blocks.
Binary file added gradle/dokka/assets/antique_bot.webp
Binary file not shown.
Binary file added gradle/dokka/assets/antique_humanoid.webp
Binary file not shown.
Binary file added gradle/dokka/assets/background_floral.webp
Binary file not shown.
Binary file added gradle/dokka/assets/background_seaside.webp
Binary file not shown.
Loading

0 comments on commit d8b7400

Please sign in to comment.