Skip to content

Commit adc545c

Browse files
committed
Add initial documentation site
1 parent 2b29c0c commit adc545c

File tree

8 files changed

+93
-2
lines changed

8 files changed

+93
-2
lines changed

.sbtopts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
-J-Djava.awt.headless=true

build.sbt

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,24 @@ libraryDependencies ++= Seq(
1313
)
1414

1515
lazy val xmlCompare = Project("xml-compare", file("xml-compare"))
16+
.settings(
17+
previewSite := {},
18+
previewAuto := {}
19+
)
1620

1721
lazy val xmlScalatest = Project("xml-scalatest", file("xml-scalatest"))
1822
.dependsOn(xmlCompare)
23+
.settings(
24+
previewSite := {},
25+
previewAuto := {}
26+
)
1927

2028
lazy val xmlSpecs2 = Project("xml-specs2", file("xml-specs2"))
2129
.dependsOn(xmlCompare)
30+
.settings(
31+
previewSite := {},
32+
previewAuto := {}
33+
)
2234

2335
lazy val root = project
2436
.in(file("."))
@@ -39,6 +51,13 @@ lazy val root = project
3951
siteSubdirName in ScalaUnidoc := "api",
4052
addMappingsToSiteDir(mappings in (ScalaUnidoc, packageDoc), siteSubdirName in ScalaUnidoc),
4153
gitRemoteRepo := "[email protected]:stringbean/scala-xml-compare.git",
42-
ghpagesNoJekyll := true
54+
ghpagesNoJekyll := true,
55+
paradoxTheme := Some(builtinParadoxTheme("generic")),
56+
sourceDirectory in Paradox := baseDirectory.value / "docs",
57+
sourceDirectory in Paradox in paradoxTheme := baseDirectory.value / "docs" / "_template",
58+
git.remoteRepo := "[email protected]:stringbean/scala-xml-compare.git",
59+
paradoxProperties in Paradox ++= Map(
60+
"scaladoc.software.purpledragon.xml.base_url" -> ".../api"
61+
)
4362
)
44-
.enablePlugins(ScalaUnidocPlugin, GhpagesPlugin)
63+
.enablePlugins(ScalaUnidocPlugin, GhpagesPlugin, ParadoxSitePlugin)

docs/_template/navigation.st

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<div class="nav-home">
2+
<a href="$page.home.href$" $if(page.home.active)$class="active"$endif$>
3+
<span class="home-icon"></span>$page.home.title$
4+
</a>
5+
<div class="version-number">
6+
$page.properties.("project.version.short")$
7+
</div>
8+
<div class="scaladoc">
9+
<a href="$page.base$api/index.html"><span class="home-icon">§</span>Scaladocs</a>
10+
</div>
11+
</div>
12+
$groups()$
13+
<div class="nav-toc">
14+
$page.navigation$
15+
</div>

docs/comparing-xml.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Comparing XML
2+
3+
4+
## Comparison Options
5+
6+
By default the following options are used:
7+
8+
* `IgnoreNamespacePrefix`

docs/index.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# scala-xml-compare
2+
3+
scala-xml-compare is a small Scala library for comparing XML documents.
4+
5+
## Getting Started
6+
7+
@@@vars
8+
```scala
9+
libraryDependencies += "purpledragon.software" %% "scala-xml" % "$project.version$"
10+
```
11+
@@@
12+
13+
Companion libraries are also provided for comparing XML from [Scalatest](http://scalatest.org/) and
14+
[Specs2](https://etorreborre.github.io/specs2/):
15+
16+
@@@vars
17+
```scala
18+
// scalatest
19+
libraryDependencies += "purpledragon.software" %% "scala-scalatest" % "$project.version$" % Test
20+
21+
// specs2
22+
libraryDependencies += "purpledragon.software" %% "scala-specs2" % "$project.version$" % Test
23+
```
24+
@@@
25+
26+
@@@ index
27+
28+
* [Comparing XML](comparing-xml.md)
29+
* [Scalatest](scalatest.md)
30+
* [Specs2](specs2.md)
31+
* [Scaladocs](@scaladoc[XmlDiff](software.purpledragon.xml.compare.XmlDiff))
32+
@@@

docs/scalatest.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Scalatest
2+
3+
Assertions can be made in [Scalatest](http://www.scalatest.org) tests using the `beXml` helper:
4+
5+
```scala
6+
result should beXml(<example>1</example>)
7+
```

docs/specs2.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Specs2
2+
3+
Assertions can be made in [Specs2](https://etorreborre.github.io/specs2/) tests using the `beXml` helper:
4+
5+
```scala
6+
result should beXml(<example>1</example>)
7+
```

project/plugins.sbt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,5 @@ addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.1.2-1")
1111
// documentation
1212
addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.4.2")
1313
addSbtPlugin("com.typesafe.sbt" % "sbt-ghpages" % "0.6.2")
14+
addSbtPlugin("com.typesafe.sbt" % "sbt-site" % "1.3.2")
15+
addSbtPlugin("com.lightbend.paradox" % "sbt-paradox" % "0.3.3")

0 commit comments

Comments
 (0)