From 28568d80fd0e68c6e15451bff54e162c4a13a528 Mon Sep 17 00:00:00 2001 From: dotiful Date: Tue, 15 Sep 2020 21:58:33 +0300 Subject: [PATCH] Update links to jinja2 docs --- README.md | 2 +- docs/README.md | 2 +- docs/howto/include-in-template.md | 2 +- docs/howto/merge-files-when-installing.md | 2 +- docs/howto/special-chars.md | 2 +- docs/templating.md | 14 +++++++------- docs/usage.md | 2 +- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 2650a4d..0d2ca42 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ a slightly different version of some of the dotfiles. Features: * Sync once every dotfile on git for different usages -* Allow dotfiles templating by leveraging [jinja2](http://jinja.pocoo.org/) +* Allow dotfiles templating by leveraging [jinja2](https://jinja.pocoo.org/) * Dynamically generated dotfile contents with pre-defined variables * Comparison between deployed and stored dotfiles * Handling multiple profiles with different sets of dotfiles diff --git a/docs/README.md b/docs/README.md index 81a11f0..cf253a2 100644 --- a/docs/README.md +++ b/docs/README.md @@ -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 content on different hosts/setups. -To achieve this, it uses [jinja2](http://jinja.pocoo.org/) which is a templating engine that allows to specify +To achieve this, it uses [jinja2](https://jinja.pocoo.org/) 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. Most information on using dotdrop are described in this documentation diff --git a/docs/howto/include-in-template.md b/docs/howto/include-in-template.md index 9290555..35e6d5e 100644 --- a/docs/howto/include-in-template.md +++ b/docs/howto/include-in-template.md @@ -1,6 +1,6 @@ # Include file or template in template -[Jinja2](http://jinja.pocoo.org/docs/2.10/templates/) provides the ability to include an external file/template from within a template with the directive `include`. See the [related doc](http://jinja.pocoo.org/docs/2.10/templates/#include) for more. The path must be relative to the `dotpath`. +[Jinja2](https://jinja.palletsprojects.com/en/2.11.x/templates/) provides the ability to include an external file/template from within a template with the directive `include`. See the [related doc](https://jinja.palletsprojects.com/en/2.11.x/templates/#include) for more. The path must be relative to the `dotpath`. For example: ```yaml diff --git a/docs/howto/merge-files-when-installing.md b/docs/howto/merge-files-when-installing.md index 3e41166..a3a3c0f 100644 --- a/docs/howto/merge-files-when-installing.md +++ b/docs/howto/merge-files-when-installing.md @@ -49,7 +49,7 @@ Dotdrop will then automagically include the files into your vimrc when handling To include all files in a directory, a combination of [dynvariables](../config-details.md#entry-dynvariables) -and [jinja2 directives](http://jinja.pocoo.org/docs/2.10/) have to be used. +and [jinja2 directives](https://jinja.palletsprojects.com/en/2.11.x/) have to be used. Let's say all files in `/toinclude` need to be included into a dotfile. diff --git a/docs/howto/special-chars.md b/docs/howto/special-chars.md index c6cd6f6..c868131 100644 --- a/docs/howto/special-chars.md +++ b/docs/howto/special-chars.md @@ -37,7 +37,7 @@ See . ### Non-unicode chars -Jinja2 is not able to process non-unicode chars (). This means that dotfiles using non-unicode chars can still be fully managed by dotdrop however when comparing the local file with the one stored in dotdrop, `compare` will return a difference even if there is none. +Jinja2 is not able to process non-unicode chars (). This means that dotfiles using non-unicode chars can still be fully managed by dotdrop however when comparing the local file with the one stored in dotdrop, `compare` will return a difference even if there is none. Either replace the non-unicode chars (see below [Re-encode](#re-encode)) or accept the fact the comparison shows a difference while there's none. diff --git a/docs/templating.md b/docs/templating.md index b5c7da2..5880f8b 100644 --- a/docs/templating.md +++ b/docs/templating.md @@ -1,13 +1,13 @@ # Templating -Dotdrop leverage the power of [jinja2](http://jinja.pocoo.org/) to handle the -templating of dotfiles. See [jinja2 template doc](http://jinja.pocoo.org/docs/2.9/templates/) +Dotdrop leverage the power of [jinja2](https://jinja.pocoo.org/) to handle the +templating of dotfiles. See [jinja2 template doc](https://jinja.pocoo.org/docs/2.9/templates/) or the below sections for more information on how to template your dotfiles. ## Delimiters Dotdrop uses different delimiters than -[jinja2](http://jinja.pocoo.org/)'s defaults: +[jinja2](https://jinja.pocoo.org/)'s defaults: * block/statement start = `{%@@` * block/statement end = `@@%}` @@ -85,7 +85,7 @@ The above aliases load all the variables from `~/dotfiles/.env` ## Template methods -Beside [jinja2 global functions](http://jinja.pocoo.org/docs/2.10/templates/#list-of-global-functions) +Beside [jinja2 global functions](https://jinja.pocoo.org/docs/2.11/templates/#list-of-global-functions) the following methods can be used within the templates: * `exists(path)`: return true when path exists @@ -140,7 +140,7 @@ this should exist ## Template filters -Beside [jinja2 builtin filters](https://jinja.palletsprojects.com/en/2.10.x/templates/#builtin-filters) +Beside [jinja2 builtin filters](https://jinja.palletsprojects.com/en/2.11.x/templates/#builtin-filters) custom user-defined filter functions can be loaded using the config entry `filter_file`: Example: @@ -163,7 +163,7 @@ dotfile content ``` For more information on how to create filters, -see [jinja2 official doc](https://jinja.palletsprojects.com/en/2.10.x/api/#writing-filters). +see [jinja2 official doc](https://jinja.palletsprojects.com/en/2.11.x/api/#writing-filters). ## Import macros @@ -190,7 +190,7 @@ The header can be automatically added with: ``` Properly commenting the header in templates is the responsibility of the user -as [jinja2](http://jinja.pocoo.org/) has no way of knowing what is the proper char(s) used for comments. +as [jinja2](https://jinja.pocoo.org/) 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 (for example `# {{@@ header() @@}}`) or provide it as an argument `{{@@ header('# ') @@}}`. The result is equivalent. diff --git a/docs/usage.md b/docs/usage.md index ca07693..154bce6 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -121,7 +121,7 @@ f_dunstrc (file: "config/dunst/dunstrc", link: nolink) ``` By using the `-T --template` switch, only the dotfiles that -are using [jinja2](http://jinja.pocoo.org/) directives are listed. +are using [jinja2](https://jinja.pocoo.org/) directives are listed. It is also possible to list all files related to each dotfile entries by invoking the `detail` command, for example: