mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-05 06:48:49 +00:00
documentation on enriched variables
This commit is contained in:
12
docs/templating.md
vendored
12
docs/templating.md
vendored
@@ -41,10 +41,22 @@ The following variables are available in templates:
|
||||
* `{{@@ _dotdrop_dotpath @@}}` contains the [dotpath](config-config.md) absolute path.
|
||||
* `{{@@ _dotdrop_cfgpath @@}}` contains the absolute path to the [config file](config-file.md).
|
||||
* `{{@@ _dotdrop_workdir @@}}` contains the [workdir](config-config.md) absolute path.
|
||||
* The [enriched variables](#variables-enrichment)
|
||||
* Dotfile specific variables (see [Dotfile variables](#dotfile-variables))
|
||||
* All defined config variables (see [Variables](config-file.md#variables))
|
||||
* All defined config interpreted variables (see [Interpreted variables](config-dynvars.md#dynvariables-entry))
|
||||
|
||||
## Variables enrichment
|
||||
|
||||
The below variables are added to the available variables withins. If the variable
|
||||
is already set by the user (through the config file for example), it will not be overwritten.
|
||||
|
||||
* `os`: will contain the OS name as provided by <https://docs.python.org/3/library/platform.html#platform.system>
|
||||
* `release`: will contain the OS release version as provided by <https://docs.python.org/3/library/platform.html#platform.release>
|
||||
* `distro_id`: will contain the distribution ID as provided by <https://distro.readthedocs.io/en/latest/#distro.id>
|
||||
* `distro_version`: will contain the distribution version as provided by <https://distro.readthedocs.io/en/latest/#distro.version>
|
||||
* `distro_like`: will contain a space-separated list of distro IDs that are closely related to the current OS distro as provided by <https://distro.readthedocs.io/en/latest/#distro.like>
|
||||
|
||||
## Dotfile variables
|
||||
|
||||
When a dotfile is handled by dotdrop, the following variables are also available for templating:
|
||||
|
||||
Reference in New Issue
Block a user