Skip to content

Commit a887786

Browse files
committed
Update Docusaurus and docs configuration:
- Bump Docusaurus from `3.7.0` to `3.9.2` - Adjust CSS max-width
1 parent f9c064a commit a887786

7 files changed

Lines changed: 1016 additions & 1099 deletions

File tree

build.sbt

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import SemVer.{Major, Minor, Patch}
44
import just.semver.AdditionalInfo.PreRelease
55
import kevinlee.sbt.SbtCommon.crossVersionProps
66
import sbtcrossproject.CrossProject
7+
import extras.scala.io.syntax.color.*
78

89
ThisBuild / scalaVersion := props.ProjectScalaVersion
910
ThisBuild / organization := "io.kevinlee"
@@ -76,7 +77,7 @@ lazy val core = module(ProjectName("core"), crossProject(JVMPlatform, JSPlatform
7677
.settings(
7778
description := "Effect Utils - Core",
7879
libraryDependencies ++= List(
79-
libs.extrasCore.value % Test,
80+
libs.extrasCore.value % Test,
8081
libs.libCatsCore(props.catsVersion).value % Test,
8182
) ++ (
8283
if (scalaVersion.value.startsWith("2.12"))
@@ -391,7 +392,17 @@ lazy val docs = (project in file("docs-gen-tmp/docs"))
391392

392393
val websiteDir = docusaurDir.value
393394
val latestVersionFile = websiteDir / "latestVersion.json"
394-
val latestVersionJson = s"""{"version":"$latestVersion"}"""
395+
val latestVersionJson = raw"""{"version":"$latestVersion"}"""
396+
397+
val websiteDirRelativePath =
398+
s"${latestVersionFile.getParentFile.getParentFile.getName.cyan}/${latestVersionFile.getParentFile.getName.yellow}"
399+
sLog
400+
.value
401+
.info(
402+
s""">> Writing ${"the latest version".blue} to $websiteDirRelativePath/${latestVersionFile.getName.green}.
403+
|>> Content: ${latestVersionJson.blue}
404+
|""".stripMargin
405+
)
395406
IO.write(latestVersionFile, latestVersionJson)
396407

397408
createMdocVariables(latestVersion.some)
@@ -412,8 +423,8 @@ lazy val docsCe3 = (project in file("docs-gen-tmp/docs-ce3"))
412423
libraryDependencies ++= {
413424
val latestTag = getTheLatestTaggedVersion()
414425
List(
415-
"org.typelevel" %% "cats-effect" % "3.6.3",
416-
"io.kevinlee" %% "effectie-cats-effect3" % latestTag,
426+
"org.typelevel" %% "cats-effect" % "3.6.3",
427+
"io.kevinlee" %% "effectie-cats-effect3" % latestTag,
417428
libs.extrasCats.value,
418429
libs.extrasConcurrent.value,
419430
)

website/docusaurus.config.ts

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,10 @@ const websiteConfig = {
3434
projectName: 'effectie', // Usually your repo name.
3535
themeConfig: {
3636
image: 'img/refined4s-social-card.jpg',
37-
prism: {
38-
theme: lightCodeTheme,
39-
darkTheme: darkCodeTheme,
40-
additionalLanguages: [
41-
'java',
42-
'scala',
43-
],
37+
docs: {
38+
sidebar: {
39+
hideable: true,
40+
},
4441
},
4542
navbar: {
4643
title: 'Effectie',
@@ -114,6 +111,17 @@ const websiteConfig = {
114111
],
115112
copyright: `Copyright © 2019 Effectie is designed and developed by <a href="https://github.com/kevin-lee" target="_blank">Kevin Lee</a>.<br>The website built with Docusaurus.`,
116113
},
114+
prism: {
115+
theme: lightCodeTheme,
116+
darkTheme: darkCodeTheme,
117+
additionalLanguages: [
118+
'bash',
119+
'diff',
120+
'json',
121+
'java',
122+
'scala',
123+
],
124+
},
117125
},
118126
presets: [
119127
[

0 commit comments

Comments
 (0)