mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-06 07:52:57 +00:00
template doc
This commit is contained in:
2
docs/config/config-actions.md
vendored
2
docs/config/config-actions.md
vendored
@@ -64,7 +64,7 @@ dotfiles:
|
||||
## Dynamic actions
|
||||
|
||||
Variables ([config variables and dynvariables](config-file.md#variables)
|
||||
and [template variables](../templating.md#template-variables)) can be used
|
||||
and [template variables](../template/template-variables.md)) can be used
|
||||
in actions for more advanced use-cases.
|
||||
|
||||
```yaml
|
||||
|
||||
4
docs/config/config-config.md
vendored
4
docs/config/config-config.md
vendored
@@ -15,9 +15,9 @@ Entry | Description | Default
|
||||
`default_actions` | List of action keys to execute for all installed dotfiles (See [actions](config-actions.md)) | -
|
||||
`diff_command` | The diff command to use for diffing files | `diff -r -u {0} {1}`
|
||||
`dotpath` | Path to the directory containing the dotfiles to be managed by dotdrop (absolute path or relative to the config file location) | `dotfiles`
|
||||
`filter_file` | List of paths to load templating filters from (See [Templating available filters](../templating.md#template-filters)) | -
|
||||
`filter_file` | List of paths to load templating filters from (See [Templating available filters](../template/template-filters.md)) | -
|
||||
`force_chmod` | If true, do not ask confirmation to apply permissions on install | false
|
||||
`func_file` | List of paths to load templating functions from (See [Templating available methods](../templating.md#template-methods)) | -
|
||||
`func_file` | List of paths to load templating functions from (See [Templating available methods](../template/template-methods.md)) | -
|
||||
`ignore_missing_in_dotdrop` | Ignore missing files in dotdrop when comparing and importing (See [Ignore missing](config-file.md#ignore-missing)) | false
|
||||
`ignoreempty` | Do not deploy template if empty | false
|
||||
`impignore` | List of patterns to ignore when importing (enclose in quotes when using wildcards; see [ignore patterns](config-file.md#ignore-patterns)) | -
|
||||
|
||||
12
docs/config/config-file.md
vendored
12
docs/config/config-file.md
vendored
@@ -35,7 +35,7 @@ parametrize the following elements of the config:
|
||||
Note that variables used in `actions` and `transformations`
|
||||
are resolved when the action/transformation is executed
|
||||
(See [Dynamic actions](config-actions.md#dynamic-actions),
|
||||
[Dynamic transformations](config-transformations.md#dynamic-transformations) and [Templating](../templating.md)).
|
||||
[Dynamic transformations](config-transformations.md#dynamic-transformations) and [Templating](../template/templating.md)).
|
||||
|
||||
The following variables are available in the config files:
|
||||
|
||||
@@ -44,13 +44,13 @@ The following variables are available in the config files:
|
||||
* [User variables defined in the config](config-variables.md)
|
||||
* [Profile variables defined in the config](config-profiles.md#profile-variables-entry)
|
||||
* Environment variables: `{{@@ env['MY_VAR'] @@}}`
|
||||
* The [enriched variables](../templating.md#enriched-variables)
|
||||
* Dotdrop header: `{{@@ header() @@}}` (see [Dotdrop header](../templating.md#dotdrop-header))
|
||||
* The [enriched variables](../template/template-variables.md#enriched-variables)
|
||||
* Dotdrop header: `{{@@ header() @@}}` (see [Dotdrop header](../template/templating.md#dotdrop-header))
|
||||
|
||||
as well as all [template methods](../templating.md#template-methods) and [template filters](../templating.md#template-filters).
|
||||
as well as all [template methods](../template/template-methods.md) and [template filters](../template/template-filters.md).
|
||||
|
||||
Note that all variables available in the config file will
|
||||
then be available during [templating](../templating.md).
|
||||
then be available during [templating](../template/templating.md).
|
||||
|
||||
Here are some rules on the use of variables in configs:
|
||||
|
||||
@@ -120,7 +120,7 @@ see the [symlink dotfiles documentation](../howto/symlink-dotfiles.md).
|
||||
|
||||
## Template config entries
|
||||
|
||||
Some entries in the config can be templated (See [templating](../templating.md)):
|
||||
Some entries in the config can be templated (See [templating](../template/templating.md)):
|
||||
|
||||
Entry | Related doc
|
||||
-------- | -------------
|
||||
|
||||
4
docs/config/config-transformations.md
vendored
4
docs/config/config-transformations.md
vendored
@@ -19,7 +19,7 @@ There are two types of transformations available:
|
||||
* They have two mandatory arguments:
|
||||
* **{0}** will be replaced with the dotfile to process
|
||||
* **{1}** will be replaced with a temporary file to store the result of the transformation
|
||||
* This Happens **before** the dotfile is templated (see [templating](../templating.md))
|
||||
* This Happens **before** the dotfile is templated (see [templating](../template/templating.md))
|
||||
|
||||
* **Write transformations**: used to transform files before updating a dotfile ([config](config-config.md) key `trans_write`)
|
||||
* Used for command `update` and `import`
|
||||
@@ -73,7 +73,7 @@ trans_write:
|
||||
|
||||
As for [dynamic actions](config-actions.md#dynamic-actions), transformations support
|
||||
the use of variables ([variables and dynvariables](config-file.md#variables)
|
||||
and [template variables](../templating.md#template-variables)).
|
||||
and [template variables](../template/template-variables.md#template-variables)).
|
||||
|
||||
A very dumb example:
|
||||
```yaml
|
||||
|
||||
Reference in New Issue
Block a user