-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
- Add dokka script plugin - Add custom prism.js script to override the default one - All languages provided as components and loaded on-demand - Clean up dokka styles - Add dokka style tweaks plugin - Majority of dokka styles moved to dokka style tweaks plugin - Replace checkboxes in markdown with real HTML checkboxes - Update dokka base.ftl to match default - Remove mathjax plugin (we weren't using it anyway) Signed-off-by: solonovamax <[email protected]>
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
* Copyright (c) 2023-2023 solonovamax <[email protected]> | ||
* | ||
* The file build.gradle.kts is part of kotlin-fuzzy | ||
* Last modified on 08-08-2023 11:01 p.m. | ||
* Last modified on 16-09-2023 04:38 p.m. | ||
* | ||
* MIT License | ||
* | ||
|
@@ -34,6 +34,10 @@ repositories { | |
mavenCentral() | ||
// for kotlin-dsl plugin | ||
gradlePluginPortal() | ||
|
||
maven("https://maven.solo-studios.ca/releases/") { | ||
name = "Solo Studios" | ||
} | ||
} | ||
|
||
java { | ||
|
@@ -56,6 +60,9 @@ kotlin { | |
dependencies { | ||
implementation(libs.dokka.base) | ||
|
||
implementation(libs.dokka.plugin.script) | ||
implementation(libs.dokka.plugin.style.tweaks) | ||
|
||
implementation(gradlePlugin(libs.plugins.kotest.multiplatform, libs.versions.kotest)) | ||
|
||
implementation(gradlePlugin(libs.plugins.dokka, libs.versions.dokka)) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
* Copyright (c) 2023-2023 solonovamax <[email protected]> | ||
* | ||
* The file kt-fuzzy.dokka.gradle.kts is part of kotlin-fuzzy | ||
* Last modified on 07-08-2023 06:56 p.m. | ||
* Last modified on 16-09-2023 04:49 p.m. | ||
* | ||
* MIT License | ||
* | ||
|
@@ -26,6 +26,10 @@ | |
* SOFTWARE. | ||
*/ | ||
|
||
import ca.solostudios.dokkascript.plugin.DokkaScriptsConfiguration | ||
import ca.solostudios.dokkascript.plugin.DokkaScriptsPlugin | ||
import ca.solostudios.dokkastyles.plugin.DokkaStyleTweaksConfiguration | ||
import ca.solostudios.dokkastyles.plugin.DokkaStyleTweaksPlugin | ||
import java.time.Year | ||
import org.jetbrains.dokka.DokkaConfiguration.Visibility | ||
import org.jetbrains.dokka.base.DokkaBase | ||
|
@@ -40,7 +44,8 @@ plugins { | |
} | ||
|
||
dependencies { | ||
dokkaPlugin(libs.dokka.mathjax.plugin) | ||
dokkaPlugin(libs.dokka.plugin.script) | ||
dokkaPlugin(libs.dokka.plugin.style.tweaks) | ||
} | ||
|
||
tasks { | ||
|
@@ -54,7 +59,16 @@ tasks { | |
from(dokkaDirectories.map { it.resolve("includes") }) | ||
|
||
doFirst { | ||
val projectInfo = ProjectInfo(project.group.toStringOrEmpty(), project.name, project.version.toStringOrEmpty()) | ||
val projectInfo = ProjectInfo( | ||
group = project.group.toStringOrEmpty(), | ||
module = project.name, | ||
version = project.version.toStringOrEmpty(), | ||
) | ||
|
||
filter { line -> | ||
line.replace("☐", "<input type=\"checkbox\" readonly>") | ||
.replace("☒", "<input type=\"checkbox\" readonly checked>") | ||
} | ||
expand("project" to projectInfo) | ||
} | ||
|
||
|
@@ -66,9 +80,28 @@ tasks { | |
pluginConfiguration<DokkaBase, DokkaBaseConfiguration> { | ||
footerMessage = "© ${Year.now()} Copyright solo-studios" | ||
separateInheritedMembers = false | ||
customStyleSheets = rootDokkaDirectory.resolve("styles").listFiles()?.toList() ?: listOf() | ||
customStyleSheets = rootDokkaDirectory.resolve("styles").listFiles()?.toList().orEmpty() | ||
customAssets = rootDokkaDirectory.resolve("assets").listFiles()?.toList().orEmpty() | ||
templatesDir = rootDokkaDirectory.resolve("templates") | ||
} | ||
pluginConfiguration<DokkaScriptsPlugin, DokkaScriptsConfiguration> { | ||
scripts = rootDokkaDirectory.resolve("scripts").listFiles()?.toList().orEmpty() | ||
remoteScripts = listOf( | ||
// MathJax | ||
"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.6/MathJax.js?config=TeX-AMS-MML_HTMLorMML&latest", | ||
) | ||
} | ||
pluginConfiguration<DokkaStyleTweaksPlugin, DokkaStyleTweaksConfiguration> { | ||
minimalScrollbar = true | ||
darkPurpleHighlight = true | ||
darkColorSchemeFix = true | ||
improvedBlockquoteBorder = true | ||
lighterBlockquoteText = true | ||
sectionTabFontWeight = "500" | ||
sectionTabTransition = true | ||
improvedSectionTabBorder = true | ||
disableCodeWrapping = true | ||
} | ||
|
||
moduleName = project.name | ||
moduleVersion = project.version.toStringOrEmpty() | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.