Skip to content

Commit

Permalink
Add material theme to paradox
Browse files Browse the repository at this point in the history
  • Loading branch information
regadas committed Nov 27, 2020
1 parent 3637d52 commit 7611150
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
14 changes: 9 additions & 5 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -78,19 +78,23 @@ lazy val root = project
.enablePlugins(NoPublishPlugin, SonatypeCiRelease)

lazy val docs = project
.enablePlugins(ParadoxPlugin, MdocPlugin, NoPublishPlugin)
.enablePlugins(ParadoxPlugin, ParadoxMaterialThemePlugin, MdocPlugin, NoPublishPlugin)
.settings(
name := "paradox-docs",
libraryDependencies += jawnAst,
paradoxTheme := Some(builtinParadoxTheme("generic")),
paradoxProperties in Compile ++= Map(
"empty" -> "",
"version" -> version.value
),
githubWorkflowArtifactUpload := false,
mdocIn := (paradox / sourceDirectory).value,
paradox / sourceManaged := mdocOut.value,
Compile / paradox := (Compile / paradox).dependsOn(mdoc.toTask("")).value
mdocIn := (Compile / baseDirectory).value / "src",
Compile / paradox / sourceDirectory := mdocOut.value,
Compile / paradox := (Compile / paradox).dependsOn(mdoc.toTask("")).value,
Compile / paradoxMaterialTheme := ParadoxMaterialTheme()
.withColor("red", "orange")
.withFont("Ubuntu", "Ubuntu Mono")
.withCopyright("Copyright (c) 2020 Typelevel")
.withRepository(uri("https://github.com/typelevel/cats-parse"))
)
.dependsOn(coreJVM, bench)

Expand Down
13 changes: 10 additions & 3 deletions docs/src/main/paradox/index.md → docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,15 @@

A parsing library for the cats ecosystem.

To use in sbt add, the following to your `libraryDependencies`:
* `"org.typelevel" %% "cats-parse" % "0.1.0"`
* or `"org.typelevel" %%% "cats-parse" % "0.1.0"` in a Scala.js project.
To use in sbt add, the following to your `libraryDependencies`:

```scala
// use this snippet for the JVM
libraryDependencies += "org.typelevel" %% "cats-parse" % "0.1.0"

// use this snippet for JS, or cross-building
libraryDependencies += "org.typelevel" %%% "cats-parse" % "0.1.0"
```

The [API docs](https://oss.sonatype.org/service/local/repositories/releases/archive/org/typelevel/cats-parse_2.12/0.0.1/cats-parse_2.12-0.0.1-javadoc.jar/!/cats/parse/index.html) are published.

Expand All @@ -25,6 +31,7 @@ this library has a few goals:

Below is most of a json parser (the string unescaping is elided). This example can give you a feel
for what it is like to use this library.

```scala mdoc:invisible
import cats.parse.bench.self.JsonStringUtil
```
Expand Down
1 change: 1 addition & 0 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ addSbtPlugin("com.codecommit" % "sbt-spiewak-sonatype" % "0.18.3")
addSbtPlugin("com.codecommit" % "sbt-github-actions" % "0.9.5")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.2")
addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.2.13")
addSbtPlugin("io.github.jonas" % "sbt-paradox-material-theme" % "0.6.0")

0 comments on commit 7611150

Please sign in to comment.