Skip to content

Commit

Permalink
Use Creative Scala theme plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
noelwelsh committed Apr 12, 2024
1 parent 9eda41f commit f4c3c0e
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 175 deletions.
17 changes: 1 addition & 16 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -84,36 +84,21 @@ lazy val docs =
)
),
mdocIn := file("docs/src/pages"),
css := {
val src = file("docs/src/css")
val dest1 = mdocOut.value
val dest2 = (laikaSite / target).value
val cmd1 =
s"npx tailwindcss -i ${src.toString}/creative-scala.css -o ${dest1.toString}/creative-scala.css"
val cmd2 =
s"npx tailwindcss -i ${src.toString}/creative-scala.css -o ${dest2.toString}/creative-scala.css"
cmd1 !

cmd2 !
},
Laika / sourceDirectories ++=
Seq(
file("docs/src/js"),
(examples.js / Compile / fastOptJS / artifactPath).value
.getParentFile() / s"${(examples.js / moduleName).value}-fastopt"
),
laikaTheme := creativeScalaTheme,
laikaTheme := CreativeScalaTheme.empty.addJs(laika.ast.Path.Root / "main.js").build,
laikaExtensions ++= Seq(
laika.format.Markdown.GitHubFlavor,
laika.config.SyntaxHighlighting,
CreativeScalaDirectives
),
tlSite := Def
.sequential(
(examples.js / Compile / fastLinkJS),
// (Compile / run).toTask(""),
mdoc.toTask(""),
css,
laikaSite
)
.value,
Expand Down
3 changes: 2 additions & 1 deletion code/src/main/scala/introduction/01-basics.scala
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ import cats.effect.*
object Basics extends IOApp.Simple {
// 0. This object extends IOApp.Simple. This allows us to run the object. It
// expects an IO with the name `run` which describes the program it will run.
// So replace `run` below with whatever you want to see when your program is run.
// So replace `run` below with whatever you want to see when your program is
// run.
val run = IO(println("Hello!"))

// 1. You can create an IO using IO(...) and IO.pure(...). (The former is the
Expand Down
111 changes: 0 additions & 111 deletions docs/src/css/creative-scala.css

This file was deleted.

46 changes: 0 additions & 46 deletions docs/src/templates/default.template.html

This file was deleted.

2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ addSbtPlugin("com.github.sbt" % "sbt-unidoc" % "0.5.0")
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.11.0")
addSbtPlugin("org.typelevel" % "sbt-typelevel" % "0.6.7")
addSbtPlugin("org.typelevel" % "sbt-typelevel-site" % "0.6.7")
addSbtPlugin("org.creativescala" % "creative-scala-theme" % "0.1.0-SNAPSHOT")
addSbtPlugin("org.creativescala" % "creative-scala-theme" % "0.2.0")

0 comments on commit f4c3c0e

Please sign in to comment.