1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-15 22:00:05 +00:00

fix jinja pocoo.org links

This commit is contained in:
deadc0de6
2020-09-15 22:04:22 +02:00
parent 6b6bfe2a45
commit 0d14281795
3 changed files with 7 additions and 7 deletions

View File

@@ -5,7 +5,7 @@ It is especially powerful when it comes to managing those across different hosts
The idea of dotdrop is to have the ability to store each dotfile only once and deploy them with a different The idea of dotdrop is to have the ability to store each dotfile only once and deploy them with a different
content on different hosts/setups. content on different hosts/setups.
To achieve this, it uses [jinja2](https://jinja.pocoo.org/) which is a templating engine that allows to specify To achieve this, it uses [jinja2](https://palletsprojects.com/p/jinja/) which is a templating engine that allows to specify
during the dotfile installation how (with what content) each dotfile will be installed based on a selected profile. during the dotfile installation how (with what content) each dotfile will be installed based on a selected profile.
Most information on using dotdrop are described in this documentation Most information on using dotdrop are described in this documentation

View File

@@ -1,13 +1,13 @@
# Templating # Templating
Dotdrop leverage the power of [jinja2](https://jinja.pocoo.org/) to handle the Dotdrop leverage the power of [jinja2](https://palletsprojects.com/p/jinja/) to handle the
templating of dotfiles. See [jinja2 template doc](https://jinja.pocoo.org/docs/2.9/templates/) templating of dotfiles. See [jinja2 template doc](https://jinja.palletsprojects.com/en/2.11.x/templates/)
or the below sections for more information on how to template your dotfiles. or the below sections for more information on how to template your dotfiles.
## Delimiters ## Delimiters
Dotdrop uses different delimiters than Dotdrop uses different delimiters than
[jinja2](https://jinja.pocoo.org/)'s defaults: [jinja2](https://palletsprojects.com/p/jinja/)'s defaults:
* block/statement start = `{%@@` * block/statement start = `{%@@`
* block/statement end = `@@%}` * block/statement end = `@@%}`
@@ -85,7 +85,7 @@ The above aliases load all the variables from `~/dotfiles/.env`
## Template methods ## Template methods
Beside [jinja2 global functions](https://jinja.pocoo.org/docs/2.11/templates/#list-of-global-functions) Beside [jinja2 global functions](https://jinja.palletsprojects.com/en/2.11.x/templates/#list-of-global-functions)
the following methods can be used within the templates: the following methods can be used within the templates:
* `exists(path)`: return true when path exists * `exists(path)`: return true when path exists
@@ -190,7 +190,7 @@ The header can be automatically added with:
``` ```
Properly commenting the header in templates is the responsibility of the user Properly commenting the header in templates is the responsibility of the user
as [jinja2](https://jinja.pocoo.org/) has no way of knowing what is the proper char(s) used for comments. as [jinja2](https://palletsprojects.com/p/jinja/) has no way of knowing what is the proper char(s) used for comments.
Either prepend the directive with the commenting char(s) used in the dotfile Either prepend the directive with the commenting char(s) used in the dotfile
(for example `# {{@@ header() @@}}`) or provide it as an argument `{{@@ header('# ') @@}}`. (for example `# {{@@ header() @@}}`) or provide it as an argument `{{@@ header('# ') @@}}`.
The result is equivalent. The result is equivalent.

View File

@@ -121,7 +121,7 @@ f_dunstrc (file: "config/dunst/dunstrc", link: nolink)
``` ```
By using the `-T --template` switch, only the dotfiles that By using the `-T --template` switch, only the dotfiles that
are using [jinja2](https://jinja.pocoo.org/) directives are listed. are using [jinja2](https://palletsprojects.com/p/jinja/) directives are listed.
It is also possible to list all files related to each dotfile entries It is also possible to list all files related to each dotfile entries
by invoking the `detail` command, for example: by invoking the `detail` command, for example: