From 17ad1051477181301337a2866d9b3f03344203e0 Mon Sep 17 00:00:00 2001 From: cheroliv Date: Sun, 22 Sep 2024 02:17:16 +0200 Subject: [PATCH] Push works --- .../kotlin/workspace/slides/SlidesPlugin.kt | 19 ++++++- formation/build.gradle.kts | 56 ++++++++++++------- 2 files changed, 53 insertions(+), 22 deletions(-) diff --git a/buildSrc/src/main/kotlin/workspace/slides/SlidesPlugin.kt b/buildSrc/src/main/kotlin/workspace/slides/SlidesPlugin.kt index 1c4ada1..e8d9e9c 100755 --- a/buildSrc/src/main/kotlin/workspace/slides/SlidesPlugin.kt +++ b/buildSrc/src/main/kotlin/workspace/slides/SlidesPlugin.kt @@ -12,12 +12,27 @@ import workspace.slides.SlidesManager.deckFile import workspace.slides.SlidesManager.slideSrcPath import java.io.File -@Suppress("unused") +//@Suppress("unused") class SlidesPlugin : Plugin { - companion object { + object RevealJsSlides { const val GROUP_TASK_SLIDER = "slider" const val TASK_ASCIIDOCTOR_REVEALJS = "asciidoctorRevealJs" const val TASK_CLEAN_SLIDES_BUILD = "cleanSlidesBuild" + const val BUILD_GRADLE_KEY = "build-gradle" + const val ENDPOINT_URL_KEY = "endpoint-url" + const val SOURCE_HIGHLIGHTER_KEY = "source-highlighter" + const val CODERAY_CSS_KEY = "coderay-css" + const val IMAGEDIR_KEY = "imagesdir" + const val TOC_KEY = "toc" + const val ICONS_KEY = "icons" + const val SETANCHORS_KEY = "setanchors" + const val IDPREFIX_KEY = "idprefix" + const val IDSEPARATOR_KEY = "idseparator" + const val DOCINFO_KEY = "docinfo" + const val REVEALJS_THEME_KEY = "revealjs_theme" + const val REVEALJS_TRANSITION_KEY = "revealjs_transition" + const val REVEALJS_HISTORY_KEY = "revealjs_history" + const val REVEALJS_SLIDENUMBER_KEY = "revealjs_slideNumber" } override fun apply(project: Project) { diff --git a/formation/build.gradle.kts b/formation/build.gradle.kts index 3bb1bcb..708bcc3 100755 --- a/formation/build.gradle.kts +++ b/formation/build.gradle.kts @@ -9,9 +9,24 @@ import workspace.WorkspaceUtils.sep import workspace.jbake.JBakeGhPagesManager.createCnameFile import workspace.jbake.JBakeGhPagesManager.sitePushDestPath import workspace.jbake.JBakeGhPagesManager.sitePushPathTo -import workspace.slides.SlidesPlugin.Companion.GROUP_TASK_SLIDER -import workspace.slides.SlidesPlugin.Companion.TASK_ASCIIDOCTOR_REVEALJS -import workspace.slides.SlidesPlugin.Companion.TASK_CLEAN_SLIDES_BUILD +import workspace.slides.SlidesPlugin.RevealJsSlides.BUILD_GRADLE_KEY +import workspace.slides.SlidesPlugin.RevealJsSlides.CODERAY_CSS_KEY +import workspace.slides.SlidesPlugin.RevealJsSlides.DOCINFO_KEY +import workspace.slides.SlidesPlugin.RevealJsSlides.ENDPOINT_URL_KEY +import workspace.slides.SlidesPlugin.RevealJsSlides.GROUP_TASK_SLIDER +import workspace.slides.SlidesPlugin.RevealJsSlides.ICONS_KEY +import workspace.slides.SlidesPlugin.RevealJsSlides.IDPREFIX_KEY +import workspace.slides.SlidesPlugin.RevealJsSlides.IDSEPARATOR_KEY +import workspace.slides.SlidesPlugin.RevealJsSlides.IMAGEDIR_KEY +import workspace.slides.SlidesPlugin.RevealJsSlides.REVEALJS_HISTORY_KEY +import workspace.slides.SlidesPlugin.RevealJsSlides.REVEALJS_SLIDENUMBER_KEY +import workspace.slides.SlidesPlugin.RevealJsSlides.REVEALJS_THEME_KEY +import workspace.slides.SlidesPlugin.RevealJsSlides.REVEALJS_TRANSITION_KEY +import workspace.slides.SlidesPlugin.RevealJsSlides.SETANCHORS_KEY +import workspace.slides.SlidesPlugin.RevealJsSlides.SOURCE_HIGHLIGHTER_KEY +import workspace.slides.SlidesPlugin.RevealJsSlides.TASK_ASCIIDOCTOR_REVEALJS +import workspace.slides.SlidesPlugin.RevealJsSlides.TASK_CLEAN_SLIDES_BUILD +import workspace.slides.SlidesPlugin.RevealJsSlides.TOC_KEY plugins { id("org.jbake.site") @@ -45,23 +60,24 @@ tasks.getByName(TASK_ASCIIDOCTOR_REVEALJS) { } attributes( mapOf( - "build-gradle" to layout.projectDirectory.let { - "$it${sep}build.gradle.kts" - }.let(::File), - "endpoint-url" to "https://talaria-formation.github.io/", - "source-highlighter" to "coderay", - "coderay-css" to "style", - "imagesdir" to ".${sep}images", - "toc" to "left", - "icons" to "font", - "setanchors" to "", - "idprefix" to "slide-", - "idseparator" to "-", - "docinfo" to "shared", - "revealjs_theme" to "black", - "revealjs_transition" to "linear", - "revealjs_history" to "true", - "revealjs_slideNumber" to "true" + BUILD_GRADLE_KEY to layout + .projectDirectory + .let { "$it${sep}build.gradle.kts" } + .let(::File), + ENDPOINT_URL_KEY to "https://talaria-formation.github.io/", + SOURCE_HIGHLIGHTER_KEY to "coderay", + CODERAY_CSS_KEY to "style", + IMAGEDIR_KEY to ".${sep}images", + TOC_KEY to "left", + ICONS_KEY to "font", + SETANCHORS_KEY to "", + IDPREFIX_KEY to "slide-", + IDSEPARATOR_KEY to "-", + DOCINFO_KEY to "shared", + REVEALJS_THEME_KEY to "black", + REVEALJS_TRANSITION_KEY to "linear", + REVEALJS_HISTORY_KEY to "true", + REVEALJS_SLIDENUMBER_KEY to "true" ) ) }