-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
34 changed files
with
171 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
Multi Configuration | ||
------------------- | ||
|
||
Paradox supports multiple sbt configurations. Each configuration is by default located to `src/configName` of the project, with the target directory defined as `target/paradox/site/configName`, `configName` corresponding to configuration.name of a particular configuration. There still remains the usual main project in `src/main` of course if you don't need multiple paradox project directories. | ||
|
||
To associate a configuration to paradox, use its settings, and change its default source and/or target directorie(s) if needed: | ||
|
||
```scala | ||
val SomeConfig = config("some-config") | ||
|
||
lazy val root = (project in file(".")). | ||
enablePlugins(ParadoxPlugin). | ||
settings( | ||
paradoxTheme = Some(builtinParadoxTheme("generic")), | ||
ParadoxPlugin.paradoxSettings(SomeConfig), | ||
sourceDirectory in SomeConfig := baseDirectory.value / "src" / "configuration-source-directory", | ||
(target in paradox) in SomeConfig := baseDirectory.value / "paradox" / "site" / "configuration-target-directory" | ||
) | ||
``` | ||
|
||
Now, either you run paradox on one configuration; "sbt someConfig:paradox" or you can run the main project with the usual way; "sbt paradox". |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
Documentation overlay | ||
--------------------- | ||
|
||
It is possible to add one or more overlays to a paradox project. Their location can be defined at build level and is applied to all configurations in the project unless we overwrite it for a particular configuration. | ||
|
||
```scala | ||
val DocsFirst = config("docs-first") | ||
val DocsSecond = config("docs-second") | ||
|
||
lazy val root = (project in file(".")). | ||
enablePlugins(ParadoxPlugin). | ||
settings( | ||
name := "Paradox Project", | ||
paradoxTheme := Some(builtinParadoxTheme("generic")), | ||
paradoxOverlayDirectories := Seq(baseDirectory.value / "src" / "docs-common"), | ||
ParadoxPlugin.paradoxSettings(DocsFirst), | ||
ParadoxPlugin.paradoxSettings(DocsSecond), | ||
paradoxOverlayDirectories in DocsFirst := Seq(baseDirectory.value / "src" / "docs-first-common", baseDirectory.value / "src" / "docs-second-common") | ||
) | ||
``` | ||
|
||
Markdown source files from the overlay directories are merged with the ones in the main project directory and are generated as if they were part of this latest. | ||
If a file duplicate exist between the directories, the overlay file is dropped in favour of the main directory file. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
val DocsFirst = config("docs-first") | ||
val DocsSecond = config("docs-second") | ||
|
||
lazy val docs = (project in file(".")). | ||
enablePlugins(ParadoxPlugin). | ||
settings( | ||
paradoxTheme := None, | ||
ParadoxPlugin.paradoxSettings(DocsFirst), | ||
ParadoxPlugin.paradoxSettings(DocsSecond), | ||
// paradoxOverlayDirectories := Seq(baseDirectory.value / "src" / "commonFirst"), | ||
paradoxOverlayDirectories in DocsFirst := Seq(baseDirectory.value / "src" / "commonFirst"), | ||
paradoxOverlayDirectories in DocsSecond := Seq(baseDirectory.value / "src" / "commonFirst", baseDirectory.value / "src" / "commonSecond") | ||
) |
Empty file.
Empty file.
3 changes: 3 additions & 0 deletions
3
.../src/sbt-test/paradox/docs-overlay/expected/docs-first/docsFirstDir/docsFirstSubfile.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<h1><a href="#sub-main" name="sub-main" class="anchor"><span class="anchor-link"></span></a>Sub-main</h1> | ||
<p>go to <a href="../commonFirst.html">commonFirst</a></p> | ||
<p>go to <a href="../commonFirstDir/commonFirstFile.html">sub-commonFirst</a></p> |
3 changes: 3 additions & 0 deletions
3
plugin/src/sbt-test/paradox/docs-overlay/expected/docs-first/docsFirstFile.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<h1><a href="#main" name="main" class="anchor"><span class="anchor-link"></span></a>Main</h1> | ||
<p>go to <a href="commonFirst.html">commonFirst</a></p> | ||
<p>go to <a href="commonFirstDir/commonFirstFile.html">sub-commonFirst</a></p> |
Empty file.
Empty file.
Empty file.
Empty file.
5 changes: 5 additions & 0 deletions
5
...c/sbt-test/paradox/docs-overlay/expected/docs-second/docsSecondDir/docsSecondSubfile.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<h1><a href="#sub-main" name="sub-main" class="anchor"><span class="anchor-link"></span></a>Sub-main</h1> | ||
<p>go to <a href="../commonFirst.html">commonFirst</a></p> | ||
<p>go to <a href="../commonFirstDir/commonFirstFile.html">sub-commonFirst</a></p> | ||
<p>go to <a href="../commonSecond.html">commonSecond</a></p> | ||
<p>go to <a href="../commonSecondDir/commonSecondFile.html">sub-commonSecond</a></p> |
5 changes: 5 additions & 0 deletions
5
plugin/src/sbt-test/paradox/docs-overlay/expected/docs-second/docsSecondFile.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<h1><a href="#main" name="main" class="anchor"><span class="anchor-link"></span></a>Main</h1> | ||
<p>go to <a href="commonFirst.html">commonFirst</a></p> | ||
<p>go to <a href="commonFirstDir/commonFirstFile.html">sub-commonFirst</a></p> | ||
<p>go to <a href="commonSecond.html">commonSecond</a></p> | ||
<p>go to <a href="commonSecondDir/commonSecondFile.html">sub-commonSecond</a></p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
addSbtPlugin("com.lightbend.paradox" % "sbt-paradox" % sys.props("project.version")) |
Empty file.
Empty file.
Empty file.
Empty file.
1 change: 1 addition & 0 deletions
1
plugin/src/sbt-test/paradox/docs-overlay/src/docs-first/paradox/_template/page.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
$page.content$ |
5 changes: 5 additions & 0 deletions
5
...st/paradox/docs-overlay/src/docs-first/paradox/docsFirstDir/docsFirstSubfile.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#Sub-main | ||
|
||
go to @ref[commonFirst](../commonFirst.md) | ||
|
||
go to @ref[sub-commonFirst](../commonFirstDir/commonFirstFile.md) |
5 changes: 5 additions & 0 deletions
5
plugin/src/sbt-test/paradox/docs-overlay/src/docs-first/paradox/docsFirstFile.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#Main | ||
|
||
go to @ref[commonFirst](commonFirst.md) | ||
|
||
go to @ref[sub-commonFirst](commonFirstDir/commonFirstFile.md) |
1 change: 1 addition & 0 deletions
1
plugin/src/sbt-test/paradox/docs-overlay/src/docs-second/paradox/_template/page.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
$page.content$ |
9 changes: 9 additions & 0 deletions
9
...paradox/docs-overlay/src/docs-second/paradox/docsSecondDir/docsSecondSubfile.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#Sub-main | ||
|
||
go to @ref[commonFirst](../commonFirst.md) | ||
|
||
go to @ref[sub-commonFirst](../commonFirstDir/commonFirstFile.md) | ||
|
||
go to @ref[commonSecond](../commonSecond.md) | ||
|
||
go to @ref[sub-commonSecond](../commonSecondDir/commonSecondFile.md) |
9 changes: 9 additions & 0 deletions
9
plugin/src/sbt-test/paradox/docs-overlay/src/docs-second/paradox/docsSecondFile.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#Main | ||
|
||
go to @ref[commonFirst](commonFirst.md) | ||
|
||
go to @ref[sub-commonFirst](commonFirstDir/commonFirstFile.md) | ||
|
||
go to @ref[commonSecond](commonSecond.md) | ||
|
||
go to @ref[sub-commonSecond](commonSecondDir/commonSecondFile.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
> docs-first:paradox | ||
> docs-second:paradox | ||
|
||
$ must-mirror target/paradox/site/docs-first/docsFirstFile.html expected/docs-first/docsFirstFile.html | ||
$ must-mirror target/paradox/site/docs-first/docsFirstDir/docsFirstSubfile.html expected/docs-first/docsFirstDir/docsFirstSubfile.html | ||
$ must-mirror target/paradox/site/docs-first/commonFirst.html expected/docs-first/commonFirst.html | ||
$ must-mirror target/paradox/site/docs-first/commonFirstDir/commonFirstFile.html expected/docs-first/commonFirstDir/commonFirstFile.html | ||
|
||
$ must-mirror target/paradox/site/docs-second/docsSecondFile.html expected/docs-second/docsSecondFile.html | ||
$ must-mirror target/paradox/site/docs-second/docsSecondDir/docsSecondSubfile.html expected/docs-second/docsSecondDir/docsSecondSubfile.html | ||
$ must-mirror target/paradox/site/docs-second/commonFirst.html expected/docs-second/commonFirst.html | ||
$ must-mirror target/paradox/site/docs-second/commonFirstDir/commonFirstFile.html expected/docs-second/commonFirstDir/commonFirstFile.html | ||
$ must-mirror target/paradox/site/docs-second/commonSecond.html expected/docs-second/commonSecond.html | ||
$ must-mirror target/paradox/site/docs-second/commonSecondDir/commonSecondFile.html expected/docs-second/commonSecondDir/commonSecondFile.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
> paradox | ||
|
||
$ must-mirror target/paradox/site/extref.html expected/extref.html | ||
$ must-mirror target/paradox/site/scaladoc.html expected/scaladoc.html | ||
$ must-mirror target/paradox/site/github.html expected/github.html | ||
$ must-mirror target/paradox/site/javadoc.html expected/javadoc.html | ||
$ must-mirror target/paradox/site/main/extref.html expected/extref.html | ||
$ must-mirror target/paradox/site/main/scaladoc.html expected/scaladoc.html | ||
$ must-mirror target/paradox/site/main/github.html expected/github.html | ||
$ must-mirror target/paradox/site/main/javadoc.html expected/javadoc.html | ||
|
||
> checkJavadocJavalibContent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
> paradox | ||
|
||
$ must-mirror target/paradox/site/scaladoc-2.12.html expected/scaladoc-2.12.html | ||
$ must-mirror target/paradox/site/main/scaladoc-2.12.html expected/scaladoc-2.12.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
> paradox | ||
|
||
$ must-mirror target/paradox/site/a.html expected/a.html | ||
$ must-mirror target/paradox/site/a/a.html expected/a/a.html | ||
$ must-mirror target/paradox/site/a/b.html expected/a/b.html | ||
$ must-mirror target/paradox/site/a/c.html expected/a/c.html | ||
$ must-mirror target/paradox/site/b/a.html expected/b/a.html | ||
$ must-mirror target/paradox/site/b/a/a.html expected/b/a/a.html | ||
$ must-mirror target/paradox/site/b/b.html expected/b/b.html | ||
$ must-mirror target/paradox/site/c/a.html expected/c/a.html | ||
$ must-mirror target/paradox/site/css/page.css expected/css/page.css | ||
$ must-mirror target/paradox/site/images/a.png expected/images/a.png | ||
$ must-mirror target/paradox/site/main/a.html expected/a.html | ||
$ must-mirror target/paradox/site/main/a/a.html expected/a/a.html | ||
$ must-mirror target/paradox/site/main/a/b.html expected/a/b.html | ||
$ must-mirror target/paradox/site/main/a/c.html expected/a/c.html | ||
$ must-mirror target/paradox/site/main/b/a.html expected/b/a.html | ||
$ must-mirror target/paradox/site/main/b/a/a.html expected/b/a/a.html | ||
$ must-mirror target/paradox/site/main/b/b.html expected/b/b.html | ||
$ must-mirror target/paradox/site/main/c/a.html expected/c/a.html | ||
$ must-mirror target/paradox/site/main/css/page.css expected/css/page.css | ||
$ must-mirror target/paradox/site/main/images/a.png expected/images/a.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
> paradox | ||
|
||
$ must-mirror target/paradox/site/snippets.html expected/snippets.html | ||
$ must-mirror target/paradox/site/reference.html expected/reference.html | ||
$ must-mirror target/paradox/site/multiple.html expected/multiple.html | ||
$ must-mirror target/paradox/site/some-xml.html expected/some-xml.html | ||
$ must-mirror target/paradox/site/nocode.html expected/nocode.html | ||
$ must-mirror target/paradox/site/configured-bases.html expected/configured-bases.html | ||
$ must-mirror target/paradox/site/main/snippets.html expected/snippets.html | ||
$ must-mirror target/paradox/site/main/reference.html expected/reference.html | ||
$ must-mirror target/paradox/site/main/multiple.html expected/multiple.html | ||
$ must-mirror target/paradox/site/main/some-xml.html expected/some-xml.html | ||
$ must-mirror target/paradox/site/main/nocode.html expected/nocode.html | ||
$ must-mirror target/paradox/site/main/configured-bases.html expected/configured-bases.html |