Skip to content

Commit

Permalink
Separate docs
Browse files Browse the repository at this point in the history
  • Loading branch information
zeotuan committed Sep 28, 2024
1 parent e49b44f commit 770e1f5
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 47 deletions.
98 changes: 52 additions & 46 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,57 @@ lazy val benchmarks = (project in file("benchmarks"))
name := "benchmarks",
).enablePlugins(JmhPlugin)

lazy val docs = (project in file("docs"))
.dependsOn(core)
.enablePlugins(LaikaPlugin)
.settings(
name := "docs",
laikaTheme := {
import laika.ast.Path.Root
import laika.ast.{Image, ExternalTarget}
import laika.helium.config.*
import laika.helium.Helium

Helium.defaults.site
.landingPage(
title = Some("Spark Fast Tests"),
subtitle = Some("Unit testing your Apache Spark application"),
latestReleases = Seq(
ReleaseInfo("Latest Stable Release", "1.0.0")
),
license = Some("MIT"),
titleLinks = Seq(
VersionMenu.create(unversionedLabel = "Getting Started"),
LinkGroup.create(
IconLink.external("https://github.com/mrpowers-io/spark-fast-tests", HeliumIcon.github)
)
),
linkPanel = Some(
LinkPanel(
"Documentation",
TextLink.internal(Root / "about" / "README.md", "Spark Fast Tests")
)
),
projectLinks = Seq(
LinkGroup.create(
TextLink.internal(Root / "api" / "com" / "github" / "mrpowers" / "spark" / "fast" / "tests" / "index.html", "API (Scaladoc)")
)
),
teasers = Seq(
Teaser("Fast", "Handle small dataframes effectively and provide column assertions"),
Teaser("Flexible", "Works fine with scalatest, uTest, munit")
)
)
.build
},
laikaIncludeAPI := true,
laikaExtensions ++= {
import laika.format.Markdown
import laika.config.SyntaxHighlighting
Seq(Markdown.GitHubFlavor, SyntaxHighlighting)
},
)

credentials += Credentials(Path.userHome / ".sbt" / "sonatype_credentials")

licenses := Seq("MIT" -> url("http://opensource.org/licenses/MIT"))
Expand All @@ -66,49 +117,4 @@ publishMavenStyle := true

publishTo := sonatypePublishToBundle.value

Global / useGpgPinentry := true

enablePlugins(LaikaPlugin)

import laika.format.Markdown
import laika.config.SyntaxHighlighting
import laika.ast.Path.Root
import laika.ast.{Image, ExternalTarget}
import laika.helium.config.*
import laika.helium.Helium

laikaTheme := Helium.defaults.site
.landingPage(
title = Some("Spark Fast Tests"),
subtitle = Some("Unit testing your Apache Spark application"),
latestReleases = Seq(
ReleaseInfo("Latest Stable Release", "1.0.0")
),
license = Some("MIT"),
titleLinks = Seq(
VersionMenu.create(unversionedLabel = "Getting Started"),
LinkGroup.create(
IconLink.external("https://github.com/mrpowers-io/spark-fast-tests", HeliumIcon.github)
)
),
linkPanel = Some(
LinkPanel(
"Documentation",
TextLink.internal(Root / "about" / "README.md", "Spark Fast Tests")
)
),
projectLinks = Seq(
LinkGroup.create(
TextLink.internal(Root / "api" / "com" / "github" / "mrpowers" / "spark" / "fast" / "tests" / "index.html", "API (Scaladoc)")
)
),
teasers = Seq(
Teaser("Fast", "Handle small dataframes effectively and provide column assertions"),
Teaser("Flexible", "Works fine with scalatest, uTest, munit")
)
)
.build

laikaIncludeAPI := true
laikaExtensions ++= Seq(Markdown.GitHubFlavor, SyntaxHighlighting)
Laika / sourceDirectories := Seq((ThisBuild / baseDirectory).value / "docs")
Global / useGpgPinentry := true
1 change: 0 additions & 1 deletion docs/about/README.md

This file was deleted.

1 change: 1 addition & 0 deletions docs/src/docs/about/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
../../README.md

0 comments on commit 770e1f5

Please sign in to comment.