mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-04 19:44:45 +00:00
add ability to template link value for #268
This commit is contained in:
@@ -556,7 +556,32 @@ profiles:
|
||||
- f_somefile
|
||||
```
|
||||
|
||||
Make sure to quote the path in the config file.
|
||||
## Dynamic dotfile link value
|
||||
|
||||
Dotfile `link` value can be dynamically constructed using
|
||||
define variables (([variables and dynvariables](config.md#variables)).
|
||||
|
||||
For example
|
||||
```yaml
|
||||
variables:
|
||||
link_value: "nolink"
|
||||
dotfiles:
|
||||
f_test:
|
||||
src: test
|
||||
dst: ~/.test
|
||||
link: "{{@@ link_value @@}}"
|
||||
profiles:
|
||||
linux:
|
||||
dotfiles:
|
||||
- f_test
|
||||
variables:
|
||||
link_value: "link"
|
||||
windows:
|
||||
dotfiles:
|
||||
- f_test
|
||||
```
|
||||
|
||||
Make sure to quote the link value in the config file.
|
||||
|
||||
## Dynamic actions
|
||||
|
||||
|
||||
@@ -73,6 +73,7 @@ Entry | Related doc
|
||||
-------- | -------------
|
||||
dotfile src | [dynamic dotfile paths](config-details.md#dynamic-dotfile-paths)
|
||||
dotfile dst | [dynamic dotfile paths](config-details.md#dynamic-dotfile-paths)
|
||||
dotfile link | [Dynamic dotfile link value](config-details.md#Dynamic-dotfile-link-value)
|
||||
variables | [variables](config-details.md#entry-variables)
|
||||
dynvariables | [dynvariables](config-details.md#entry-dynvariables)
|
||||
actions | [dynamic actions](config-details.md#dynamic-actions)
|
||||
|
||||
Reference in New Issue
Block a user