Often it is necessary to transport values from the build into the documentation, like the current version of the project. This can be done with properties. Properties can be defined with sbt settings and can then be accessed in documentation Markdown files.
To define properties add a key / value tuple to the
paradoxProperties setting. For example, to make the Scala version of the build available to the documentation you can use this (in fact, this property is already predefined):
paradoxProperties += ("scala.version" -> scalaVersion.value)
You can set or override property values with “front-matter” on pages. At the beginning of a Markdown file, add a block
--- key: This is my key value ---
to change a property value just for this page.
In Markdown you can either directly reference properties using dollar notation
For example, this snippet:
The scala version is "$scala.version$".
The scala version is “2.12.8”.
project.name: Name of the project
project.version: Project version
project.version.short: Project version with
project.description: Project description
scala.version: Project Scala Version
scala.binary.version: Project Scala binary compatible version (e.g. “2.12”)
date: Generation date in the form
MMM DD, YYYY
date.day: Generation day of the month
date.month: Generation month
date.year: Generation year
Some properties have special meaning for the generation engine. See the Templating section for more information.