-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into updateScalaFiddleIntegration
- Loading branch information
Showing
32 changed files
with
435 additions
and
184 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,64 @@ | ||
# Configuration | ||
|
||
Paradox is configured with sbt settings. | ||
|
||
TBD - explain main settings here | ||
|
||
## Overlays | ||
|
||
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. | ||
|
||
## 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". | ||
|
||
## Version warning | ||
|
||
Paradox supports showing a warning when users browse documentation which is not the current released version. This is achieved by storing a JSON file (`paradox.json`) together with the generated site and specifying a stable URL to where the released version will be available. | ||
|
||
The built in theme (`generic`) contains Javascript to fetch the JSON file and compare the version with the version for which the documentation showing was generated. Whenever they differ, a warning text shows on every page offering a link to the released version's page. | ||
|
||
To use this functionality, add `project.url` to Paradox properties | ||
|
||
```scala | ||
paradoxProperties += ("project.url" -> "https://developer.lightbend.com/docs/paradox/current/") | ||
``` |
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,18 @@ | ||
# Pre-packaged Extensions | ||
|
||
## Themes | ||
|
||
* [Akka Paradox Theme + Extensions](https://github.com/akka/akka-paradox): Custom theme used by the | ||
[Akka documentation](https://akka.io/docs/akka/): | ||
|
||
![Akka Docs Screenshot](../img/akka-paradox-theme.png) | ||
|
||
* [Paradox Material Theme](https://github.com/jonas/paradox-material-theme): A theme built using Google's Material Design | ||
guidelines: | ||
|
||
![Material Theme Screenshot](../img/material-theme.png) | ||
|
||
## Directives | ||
|
||
* [Apidoc directive](https://github.com/lightbend/sbt-paradox-apidoc): `@apidoc` directive that will automatically | ||
create links to Java Apidoc or Scala Scaladoc depending on a language choosing dropdown |
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 @@ | ||
# Customization | ||
|
||
@@toc | ||
|
||
@@@ index | ||
* [Templating](templating.md) | ||
* [Themes](theming.md) | ||
* [Pre-packaged Extensions](extensions.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
3 changes: 1 addition & 2 deletions
3
docs/src/main/paradox/features/theming.md → ...src/main/paradox/customization/theming.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
File renamed without changes.
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
File renamed without changes.
16 changes: 16 additions & 0 deletions
16
docs/src/main/paradox/directives/directives-alphabetically.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,16 @@ | ||
# Alphabetical List of Directives | ||
|
||
* @ref[`@@dependencies`](dependencies.md) | ||
* @ref[`@@@div`](css-friendliness.md#div) | ||
* @ref[`@extref`](linking.md#extref-directive) | ||
* @ref[`@github`](linking.md#github-directive) | ||
* @ref[`@@@index`](organizing-pages.md#index-container) | ||
* @ref[`@javadoc`](linking.md#javadoc) | ||
* @ref[`@@@note`](callouts.md#note-callout) | ||
* @ref[`@ref`](linking.md#ref-link) | ||
* @ref[`@scaladoc`](linking.md#scaladoc) | ||
* @ref[`@@snip`](snippets.md) | ||
* @ref[`@@toc`](organizing-pages.md#toc-block) | ||
* @ref[`@var`](vars.md#var) | ||
* @ref[`@vars`](vars.md#vars) | ||
* @ref[`@@@warning`](callouts.md#warning-callout) |
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,19 @@ | ||
# Directives | ||
|
||
Directives are Paradox' extension points for providing customized behavior over Markdown. Directive can be recognized by the `@` sign | ||
which signifies a directive usage. Depending on the scope of the directive you will use a different kind of syntax. Use `@` (for inline), | ||
`@@` (leaf block), `@@@`(container block), `@@@@` or more for nested container blocks. | ||
|
||
@@toc | ||
|
||
@@@ index | ||
|
||
* [Index and Table Of Contents Directives](organizing-pages.md) | ||
* [Linking Directives](linking.md) | ||
* [Snippet Directives](snippets.md) | ||
* [Callout Directives](callouts.md) | ||
* [Variable Substitution Directives](vars.md) | ||
* [CSS Friendliness Directives](css-friendliness.md) | ||
* [Directive List](directives-alphabetically.md) | ||
|
||
@@@ |
File renamed without changes.
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
Oops, something went wrong.