mirror of
https://github.com/bitcoin-s/bitcoin-s.git
synced 2025-02-23 06:45:21 +01:00
This allows working on the website without opening sbt at all. bloop run docs -- --watch compiles all Mdoc sources and outputs it into the correct directory.
37 lines
872 B
Scala
37 lines
872 B
Scala
lazy val bitcoins = RootProject(file("."))
|
|
|
|
lazy val publishWebsite = taskKey[Unit]("Publish website")
|
|
|
|
publishWebsite := Def
|
|
.sequential(
|
|
bitcoins / Compile / unidoc,
|
|
Compile / docusaurusPublishGhpages
|
|
)
|
|
.value
|
|
|
|
name := "bitcoin-s-docs"
|
|
|
|
publish / skip := true
|
|
|
|
////////
|
|
/// Mdoc
|
|
|
|
// Without this we get errors on bad links,
|
|
// but those links are to other parts of
|
|
// the website, AKA false errors.
|
|
// See this issue: https://github.com/scalameta/mdoc/issues/94
|
|
mdocExtraArguments := List("--no-link-hygiene")
|
|
|
|
mdocVariables := Map(
|
|
"STABLE_VERSION" -> previousStableVersion.value.get,
|
|
"UNSTABLE_VERSION" -> version.value
|
|
)
|
|
|
|
enablePlugins(MdocPlugin, DocusaurusPlugin, BuildInfoPlugin)
|
|
buildInfoKeys := Seq[BuildInfoKey](mdocVariables, mdocExtraArguments)
|
|
buildInfoPackage := "org.bitcoins.docs"
|
|
|
|
// Mdoc end
|
|
///////
|
|
|
|
libraryDependencies ++= Deps.docs
|