-
Notifications
You must be signed in to change notification settings - Fork 344
/
build.sbt
43 lines (40 loc) · 1.56 KB
/
build.sbt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import com.typesafe.sbt.site.util.SiteHelpers
import Docs._
lazy val tutorialSubDirName = settingKey[String]("subdir name for old tutorial")
lazy val fileEncoding = settingKey[String]("check the file encoding")
lazy val landingSubDirName = settingKey[String]("subdir name for landing")
ThisBuild / organization := "org.scala-sbt"
ThisBuild / scalafmtOnCompile := true
lazy val root = (project in file("."))
.enablePlugins(
(if (isDevelopBranch) Seq(DocusaurusSitePlugin) else Seq()) ++
Seq(MdBookSitePlugin, ScriptedPlugin, SitePreviewPlugin): _*
)
.settings(
name := "website",
siteEmail := "eed3si9n" + "@gmail.com",
// Reference
MdBook / siteSubdirName := s"""$targetSbtBinaryVersion/docs/""",
tutorialSubDirName := s"""$targetSbtBinaryVersion/tutorial""",
landingSubDirName := "",
// Redirects
redirectSettings,
// SiteHelpers.addMappingsToSiteDir(Redirect / mappings, Pamflet / siteSubdirName),
SiteHelpers.addMappingsToSiteDir(RedirectLanding / mappings, landingSubDirName),
// redirectTutorialSettings,
// SiteHelpers.addMappingsToSiteDir(RedirectTutorial / mappings, tutorialSubDirName),
// GitHub Pages. See project/Docs.scala
customGhPagesSettings,
fileEncoding := {
sys.props("file.encoding") match {
case "UTF-8" => "UTF-8"
case x => sys.error(s"Unexpected encoding $x")
}
},
scriptedLaunchOpts := {
scriptedLaunchOpts.value ++
Seq("-Xmx1024M", "-Dplugin.version=" + version.value)
},
scriptedBufferLog := false,
isGenerateSiteMap := true
)