Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions mdoc-sbt/src/main/scala/mdoc/DocusaurusPlugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ object DocusaurusPlugin extends AutoPlugin {
|call yarn publish-gh-pages
""".stripMargin

lazy val yarnBin =
if (scala.util.Properties.isWin) "yarn.cmd"
else "yarn"

override def projectSettings: Seq[Def.Setting[_]] =
List(
aggregate.in(docusaurusPublishGhpages) := false,
Expand Down Expand Up @@ -121,8 +125,8 @@ object DocusaurusPlugin extends AutoPlugin {
},
docusaurusCreateSite := {
m.mdoc.in(Compile).toTask(" ").value
Process(List("yarn", "install"), cwd = website.value).execute()
Process(List("yarn", "run", "build"), cwd = website.value).execute()
Process(List(yarnBin, "install"), cwd = website.value).execute()
Process(List(yarnBin, "run", "build"), cwd = website.value).execute()
val redirectUrl = docusaurusProjectName.value + "/index.html"
val html = redirectHtml(redirectUrl)
val out = website.value / "build"
Expand Down