Skip to content

Commit

Permalink
Push works
Browse files Browse the repository at this point in the history
  • Loading branch information
cheroliv committed Sep 22, 2024
1 parent 93aaf12 commit 17ad105
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 22 deletions.
19 changes: 17 additions & 2 deletions buildSrc/src/main/kotlin/workspace/slides/SlidesPlugin.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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<Project> {
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) {
Expand Down
56 changes: 36 additions & 20 deletions formation/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -45,23 +60,24 @@ tasks.getByName<AsciidoctorJRevealJSTask>(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"
)
)
}
Expand Down

0 comments on commit 17ad105

Please sign in to comment.