From baca2dc09a2c89f486c75c236eb9f49490c45bc8 Mon Sep 17 00:00:00 2001 From: Jens Halm <3116929+jenshalm@users.noreply.github.com> Date: Sun, 24 Sep 2023 02:42:09 +0100 Subject: [PATCH 1/5] migrate to Laika 1.0 (using a snapshot very close to M5 here) --- site/build.sbt | 5 ++++- .../org/typelevel/sbt/site/GenericSiteSettings.scala | 5 ++++- .../typelevel/sbt/site/TypelevelHeliumExtensions.scala | 8 ++++---- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/site/build.sbt b/site/build.sbt index 2db1606f..acdc0a38 100644 --- a/site/build.sbt +++ b/site/build.sbt @@ -1,2 +1,5 @@ +resolvers += + "Sonatype OSS Snapshots" at "https://s01.oss.sonatype.org/content/repositories/snapshots" + addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.3.7") -addSbtPlugin("org.planet42" % "laika-sbt" % "0.19.5") +addSbtPlugin("org.typelevel" % "laika-sbt" % "1.0-ab381f4-SNAPSHOT") diff --git a/site/src/main/scala/org/typelevel/sbt/site/GenericSiteSettings.scala b/site/src/main/scala/org/typelevel/sbt/site/GenericSiteSettings.scala index 3b6e589f..127809c9 100644 --- a/site/src/main/scala/org/typelevel/sbt/site/GenericSiteSettings.scala +++ b/site/src/main/scala/org/typelevel/sbt/site/GenericSiteSettings.scala @@ -57,9 +57,12 @@ object GenericSiteSettings { @nowarn("cat=deprecation") private val legacyRelatedProjects: Initialize[Option[ThemeNavigationSection]] = setting { NonEmptyList.fromList(tlSiteRelatedProjects.value.toList).map { projects => + val links = projects.map { case (name, url) => TextLink.external(url.toString, name) } ThemeNavigationSection( "Related Projects", - projects.map { case (name, url) => TextLink.external(url.toString, name) }) + links.head, + links.tail* + ) } } diff --git a/site/src/main/scala/org/typelevel/sbt/site/TypelevelHeliumExtensions.scala b/site/src/main/scala/org/typelevel/sbt/site/TypelevelHeliumExtensions.scala index 87be973a..e70f1823 100644 --- a/site/src/main/scala/org/typelevel/sbt/site/TypelevelHeliumExtensions.scala +++ b/site/src/main/scala/org/typelevel/sbt/site/TypelevelHeliumExtensions.scala @@ -20,9 +20,9 @@ import cats.effect.Async import cats.effect.kernel.Resource import laika.ast.Path import laika.io.model.InputTree -import laika.markdown.github.GitHubFlavor -import laika.parse.code.SyntaxHighlighting -import laika.parse.code.languages.DottySyntax +import laika.format.Markdown.GitHubFlavor +import laika.config.SyntaxHighlighting +import laika.parse.code.languages.ScalaSyntax import laika.theme.Theme import laika.theme.ThemeBuilder import laika.theme.ThemeProvider @@ -70,7 +70,7 @@ object TypelevelHeliumExtensions { ) .addExtensions( GitHubFlavor, - if (scala3) SyntaxHighlighting.withSyntaxBinding("scala", DottySyntax) + if (scala3) SyntaxHighlighting.withSyntaxBinding("scala", ScalaSyntax.Scala3) else SyntaxHighlighting ) .build From d89aeee6ff56be0d36ad1ffcb5bbbf842e51cc37 Mon Sep 17 00:00:00 2001 From: Jens Halm <3116929+jenshalm@users.noreply.github.com> Date: Mon, 25 Sep 2023 19:20:30 +0100 Subject: [PATCH 2/5] switch to Laika 1.0.0-M5 --- site/build.sbt | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/site/build.sbt b/site/build.sbt index acdc0a38..cee8bf22 100644 --- a/site/build.sbt +++ b/site/build.sbt @@ -1,5 +1,2 @@ -resolvers += - "Sonatype OSS Snapshots" at "https://s01.oss.sonatype.org/content/repositories/snapshots" - addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.3.7") -addSbtPlugin("org.typelevel" % "laika-sbt" % "1.0-ab381f4-SNAPSHOT") +addSbtPlugin("org.typelevel" % "laika-sbt" % "1.0.0-M5") From 57b17b6e8fb112edbf29be4f920e30a425794b07 Mon Sep 17 00:00:00 2001 From: Jens Halm <3116929+jenshalm@users.noreply.github.com> Date: Mon, 25 Sep 2023 19:33:06 +0100 Subject: [PATCH 3/5] address scalafix issue --- .../org/typelevel/sbt/site/TypelevelHeliumExtensions.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/site/src/main/scala/org/typelevel/sbt/site/TypelevelHeliumExtensions.scala b/site/src/main/scala/org/typelevel/sbt/site/TypelevelHeliumExtensions.scala index e70f1823..31afd3ce 100644 --- a/site/src/main/scala/org/typelevel/sbt/site/TypelevelHeliumExtensions.scala +++ b/site/src/main/scala/org/typelevel/sbt/site/TypelevelHeliumExtensions.scala @@ -19,9 +19,9 @@ package org.typelevel.sbt.site import cats.effect.Async import cats.effect.kernel.Resource import laika.ast.Path -import laika.io.model.InputTree -import laika.format.Markdown.GitHubFlavor import laika.config.SyntaxHighlighting +import laika.format.Markdown.GitHubFlavor +import laika.io.model.InputTree import laika.parse.code.languages.ScalaSyntax import laika.theme.Theme import laika.theme.ThemeBuilder From 95b823e4d95512218f549c27026479ba967a0438 Mon Sep 17 00:00:00 2001 From: Jens Halm <3116929+jenshalm@users.noreply.github.com> Date: Mon, 25 Sep 2023 19:33:31 +0100 Subject: [PATCH 4/5] bump base version --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 63b112b4..3720952a 100644 --- a/build.sbt +++ b/build.sbt @@ -2,7 +2,7 @@ name := "sbt-typelevel" import org.typelevel.sbt.gha.{PermissionScope, PermissionValue, Permissions} -ThisBuild / tlBaseVersion := "0.5" +ThisBuild / tlBaseVersion := "0.6" ThisBuild / crossScalaVersions := Seq("2.12.18") ThisBuild / developers ++= List( tlGitHubDev("armanbilge", "Arman Bilge"), From a4b6e0fafce02125570d79529cd6345e97c8a40d Mon Sep 17 00:00:00 2001 From: Jens Halm <3116929+jenshalm@users.noreply.github.com> Date: Mon, 16 Oct 2023 20:46:47 +0100 Subject: [PATCH 5/5] use 1.0.0 final --- site/build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/build.sbt b/site/build.sbt index cee8bf22..75682e9c 100644 --- a/site/build.sbt +++ b/site/build.sbt @@ -1,2 +1,2 @@ addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.3.7") -addSbtPlugin("org.typelevel" % "laika-sbt" % "1.0.0-M5") +addSbtPlugin("org.typelevel" % "laika-sbt" % "1.0.0")