From 91cc146c56cfe48cc964ff3f01509948fca1b4d2 Mon Sep 17 00:00:00 2001 From: Erik Erlandson Date: Mon, 10 Jun 2024 06:01:42 -0700 Subject: [PATCH] trying versioned docs --- build.sbt | 15 +++++++++++++++ docs/directory.conf | 1 + 2 files changed, 16 insertions(+) diff --git a/build.sbt b/build.sbt index c5ff7dc7f..a5ed0c30d 100644 --- a/build.sbt +++ b/build.sbt @@ -209,6 +209,20 @@ lazy val unidocs = project // http://localhost:4242 import laika.ast.VirtualPath import laika.config.{LinkConfig, ApiLinks, SourceLinks, TargetDefinition} +import laika.config.{Version, Versions} +import laika.theme.ThemeProvider +import laika.helium.Helium + +val docVersions = Versions + .forCurrentVersion(Version("0.8.0", "0.8.0").setCanonical) + .withNewerVersions( + Version("0.9.0-RC1", "0.9.0-RC1").withLabel("release-candidate") + ) + +val docTheme: ThemeProvider = Helium.defaults + .site.versions(docVersions) + .build + lazy val docs = project .in(file("site")) .dependsOn( @@ -226,6 +240,7 @@ lazy val docs = project Compile / scalacOptions ~= (_.filterNot { x => x.startsWith("-W") }) ) .settings( + laikaTheme := docTheme, laikaConfig := LaikaConfig.defaults .withConfigValue( LinkConfig.empty diff --git a/docs/directory.conf b/docs/directory.conf index 06c913a84..452c8d697 100644 --- a/docs/directory.conf +++ b/docs/directory.conf @@ -1,3 +1,4 @@ +laika.versioned = true laika.navigationOrder = [ coulomb-core.md coulomb-units.md