From f1e978599cc0e3530e9ef0cc58b3a2ebbd9c312a Mon Sep 17 00:00:00 2001 From: sergeych Date: Thu, 20 Nov 2025 01:17:56 +0100 Subject: [PATCH] deployment refined --- bin/deploy_site | 2 -- site/build.gradle.kts | 11 +++++++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/bin/deploy_site b/bin/deploy_site index 89b3d94..a364d85 100755 --- a/bin/deploy_site +++ b/bin/deploy_site @@ -45,8 +45,6 @@ case "com" in esac die() { echo "ERROR: $*" 1>&2 ; exit 1; } -#rm build/distributions/*.js > /dev/null -#rm build/distributions/*.js.map > /dev/null ./gradlew site:clean site:jsBrowserDistribution || die "compilation failed" diff --git a/site/build.gradle.kts b/site/build.gradle.kts index 50930a3..2ff475a 100644 --- a/site/build.gradle.kts +++ b/site/build.gradle.kts @@ -56,8 +56,7 @@ kotlin { // Self-host MathJax via npm and bundle it with webpack implementation(npm("mathjax", "3.2.2")) } - // Serve project docs and images as static resources in the site - resources.srcDir(rootProject.projectDir.resolve("docs")) + // Serve images as static resources in the site resources.srcDir(rootProject.projectDir.resolve("images")) // Also include generated resources (e.g., docs index JSON) // Use Gradle's layout to properly reference the build directory provider @@ -129,4 +128,12 @@ listOf( } } +// Copy Markdown docs into the "docs/" folder in the final resources, so paths in docs-index.json match files +tasks.named("jsProcessResources").configure { + // Ensure we don't end up with two copies at root; we no longer add docs as a plain resources srcDir + from(rootProject.projectDir.resolve("docs")) { + into("docs") + } +} + // Optional: configure toolchain if needed by the project; uses root Kotlin version from version catalog \ No newline at end of file