Skip to content

Commit fa51533

Browse files
committed
Add GitHub repo link button to Dokka-generated docs
1 parent ab14e39 commit fa51533

File tree

4 files changed

+14
-2
lines changed

4 files changed

+14
-2
lines changed

build.gradle.kts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ mavenPublishing {
1616
name = "devlog-kotlin"
1717
description =
1818
"Logging library for Kotlin JVM, that thinly wraps SLF4J and Logback to provide a more ergonomic API."
19-
url = "https://hermannm.dev/devlog"
19+
url = "https://devlog-kotlin.hermannm.dev"
2020
inceptionYear = "2024"
2121

2222
licenses {
@@ -169,7 +169,7 @@ apiValidation { ignoredProjects.addAll(subprojects.map { it.name }) }
169169
dokka {
170170
dokkaSourceSets.configureEach {
171171
// Embeds this Markdown file on the module documentation page
172-
includes.from("gradle/dokka-module-docs.md")
172+
includes.from("gradle/dokka/module-docs.md")
173173

174174
sourceLink {
175175
// Links to the Git tag for the current version of the library
@@ -185,8 +185,12 @@ dokka {
185185
}
186186

187187
pluginsConfiguration.html {
188+
homepageLink = "https://github.com/hermannm/devlog-kotlin"
188189
footerMessage =
189190
"""Developed by Hermann Mørkrid (<a href="https://hermannm.dev" target="_blank" style="color: inherit; text-decoration: underline">https://hermannm.dev</a>). Licensed under <a href="https://github.com/hermannm/devlog-kotlin/blob/main/LICENSE" target="_blank" style="color: inherit; text-decoration: underline">MIT</a>."""
191+
// Overrides the default homepage link icon with a GitHub icon
192+
customAssets.from("gradle/dokka/github-icon.svg")
193+
customStyleSheets.from("gradle/dokka/custom-styles.css")
190194
}
191195
}
192196

gradle/dokka/custom-styles.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.navigation-controls--btn_homepage {
2+
background-image: url("../images/github-icon.svg")
3+
}

gradle/dokka/github-icon.svg

Lines changed: 5 additions & 0 deletions
Loading
File renamed without changes.

0 commit comments

Comments
 (0)