forked from PurpleKingdomGames/indigo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
139 lines (127 loc) · 3.63 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
import laika.markdown.github.GitHubFlavor
import laika.parse.code.SyntaxHighlighting
import laika.rewrite.nav.PrettyURLs
import laika.helium.Helium
import laika.theme.config.Color
import laika.theme.config.Color._
import laika.helium.config.ColorQuintet
import laika.helium.config._
import laika.ast.Path.Root
import laika.ast.Image
import laika.ast.Length
import laika.ast.LengthUnit
import com.comcast.ip4s._
import scala.concurrent.duration.DurationInt
import laika.sbt.LaikaPreviewConfig
import java.time.OffsetDateTime
ThisBuild / scalaVersion := "3.3.1"
enablePlugins(LaikaPlugin, GhpagesPlugin)
Global / onChangedBuildSource := ReloadOnSourceChanges
Laika / sourceDirectories := Seq(
baseDirectory.value / "../indigo/indigo-docs/target/mdoc"
)
laikaExtensions := Seq(GitHubFlavor, SyntaxHighlighting, PrettyURLs)
/*
Dark purple - #29016a
hot pink - #ae2be2 / less hot: 9003c8
light pink - #efc6ff
Purpleish - 6237a7
Light grey - e4e4e4
Light purple - a888db
*/
laikaTheme :=
Helium.defaults.all
.metadata(
title = Some("Indigo"),
description = Some("A 2D Pixel Art FP game engine for Scala."),
identifier = Some(""),
authors = Seq(),
language = Some("en"),
datePublished = Some(OffsetDateTime.now),
version = Some("1.0.0")
)
.all
.themeColors(
primary = Color.hex("29016a"),
secondary = Color.hex("9003c8"),
primaryMedium = Color.hex("a888db"),
primaryLight = Color.hex("e4e4e4"),
text = Color.hex("5f5f5f"),
background = Color.hex("ffffff"),
bgGradient = (Color.hex("095269"), Color.hex("007c99"))
)
.site
.darkMode
.themeColors(
primary = Color.hex("29016a"),
secondary = Color.hex("9003c8"),
primaryMedium = Color.hex("a888db"),
primaryLight = Color.hex("e4e4e4"),
text = Color.hex("5f5f5f"),
background = Color.hex("ffffff"),
bgGradient = (Color.hex("29016a"), Color.hex("ffffff"))
)
.all
.syntaxHighlightingColors(
base = ColorQuintet(
hex("2a3236"),
hex("8c878e"),
hex("b2adb4"),
hex("bddcee"),
hex("e8e8e8")
),
wheel = ColorQuintet(
hex("e28e93"),
hex("ef9725"),
hex("ffc66d"),
hex("7fb971"),
hex("4dbed4")
)
)
.site
.topNavigationBar(
homeLink = ImageLink.internal(
Root / "README.md",
Image.internal(
Root / "img" / "indigo_logo_solid_text.svg",
alt = Some("Homepage"),
title = Some("Indigo"),
width = Some(Length(150.0, LengthUnit.px)),
height = Some(Length(50.0, LengthUnit.px))
)
),
navLinks = Seq(
ButtonLink.external("https://discord.gg/b5CD47g", "Discord"),
ButtonLink.external("/api", "API"),
ButtonLink.external(
"https://github.com/PurpleKingdomGames/indigo",
"Github"
)
)
)
.site
.tableOfContent(title = "Contents", depth = 2)
.site
.autoLinkCSS(Root / "css" / "custom.css")
.site.favIcons(
Favicon.internal(Root / "img" / "indigo_logo_solid.svg", sizes = "32x32"),
Favicon.internal(Root / "img" / "indigo_logo_solid.svg", sizes = "64x64")
)
.build
// Helium.defaults
laikaPreviewConfig :=
LaikaPreviewConfig.defaults
.withPort(port"8080")
// Make site
siteSourceDirectory := target.value / "docs" / "site"
makeSite / includeFilter := "*"
makeSite / excludeFilter := ".DS_Store"
git.remoteRepo := "[email protected]:PurpleKingdomGames/indigo.git"
ghpagesNoJekyll := true
addCommandAlias(
"publishIndigoSite",
List(
"makeSite",
"ghpagesPushSite"
).mkString(";", ";", "")
)