[tutorial v1.1_082)] A web_address variable (config and doc)
This commit is contained in:
parent
915240417c
commit
f5e4c1eb7b
5 changed files with 119 additions and 12 deletions
97
README.md
97
README.md
|
|
@ -1,9 +1,9 @@
|
|||
- [Summary](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/branch/1.1/README.md)
|
||||
- [[tutorial v1.1_080] A boolean variable](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_080/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_080~1..v1.1_080))
|
||||
- [[tutorial v1.1_081] A choice variable](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_081/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_081~1..v1.1_081))
|
||||
|
||||
# [tutorial v1.1_081)] A choice variable
|
||||
# [tutorial v1.1_082)] A web_address variable
|
||||
|
||||
[View the diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_081~1..v1.1_081)
|
||||
[View the diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_082~1..v1.1_082)
|
||||
|
||||
|
||||
## Screenshot
|
||||
|
|
@ -223,13 +223,23 @@ dns_over_https: # DNS over HTTPS
|
|||
disabled:
|
||||
variable: _.enable_dns_over_https
|
||||
when: false
|
||||
|
||||
custom_dns_url:
|
||||
description: Custom DNS URL
|
||||
type: web_address
|
||||
disabled:
|
||||
jinja: |-
|
||||
{% if _.provider is propertyerror or _.provider != 'Custom' %}
|
||||
provider is not custom
|
||||
{% endif %}
|
||||
description: if "_.provider" is not "Custom"
|
||||
...
|
||||
|
||||
```
|
||||
### Let's generate the documentation
|
||||
|
||||
```console
|
||||
foo@bar:~$ git switch --detach v1.1_081
|
||||
foo@bar:~$ git switch --detach v1.1_082
|
||||
foo@bar:~$ rougail -m firefox/ --modes_level basic standard advanced -o doc
|
||||
```
|
||||
| Variable | Description |
|
||||
|
|
@ -289,24 +299,25 @@ or "firefox.manual.socks_proxy.version" is "v4"
|
|||
|
||||
**dns_over_https**
|
||||
|
||||
`standard`
|
||||
`basic`
|
||||
|
||||
| Variable | Description |
|
||||
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| **dns_over_https.enable_dns_over_https**<br/>[`boolean`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | Enable DNS over HTTPS.<br/>**Default**: false |
|
||||
| **dns_over_https.provider**<br/>[`choice`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` *`disabled`* | Use Provider.<br/>**Choices**: <br/>- Cloudflare **← (default)**<br/>- NextDNS<br/>- Custom<br/>**Disabled**: when the variable "dns_over_https.enable_dns_over_https" has the value "false" |
|
||||
| **dns_over_https.custom_dns_url**<br/>[`web_address`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `basic` `mandatory` *`disabled`* | Custom DNS URL.<br/>**Validator**: the domain name in web address can be only a hostname<br/>**Disabled**: if "_.provider" is not "Custom" |
|
||||
|
||||
### Let's generate the changelog
|
||||
|
||||
```console
|
||||
foo@bar:~$ git switch --detach v1.1_081
|
||||
foo@bar:~$ git switch --detach v1.1_082
|
||||
foo@bar:~$ rougail -m firefox/ --modes_level basic standard advanced -o doc --doc.contents changelog
|
||||
```
|
||||
#### New variable
|
||||
|
||||
| Variable | Description |
|
||||
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| **dns_over_https.provider**<br/>[`choice`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` *`disabled`* | Use Provider.<br/>**Choices**: <br/>- Cloudflare **← (default)**<br/>- NextDNS<br/>- Custom<br/>**Disabled**: when the variable "dns_over_https.enable_dns_over_https" has the value "false" |
|
||||
| Variable | Description |
|
||||
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| **dns_over_https.custom_dns_url**<br/>[`web_address`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `basic` `mandatory` *`disabled`* | Custom DNS URL.<br/>**Validator**: the domain name in web address can be only a hostname<br/>**Disabled**: if "_.provider" is not "Custom" |
|
||||
|
||||
|
||||
## User datas
|
||||
|
|
@ -323,7 +334,7 @@ foo@bar:~$ rougail -m firefox/ --modes_level basic standard advanced -o doc --do
|
|||
#### Output
|
||||
|
||||
```console
|
||||
foo@bar:~$ git switch --detach v1.1_081
|
||||
foo@bar:~$ git switch --detach v1.1_082
|
||||
foo@bar:~$ rougail -m firefox/ --modes_level basic standard advanced -u yaml -ff config/01/config.yaml
|
||||
```
|
||||
<pre>╭─────── Caption ────────╮
|
||||
|
|
@ -348,7 +359,7 @@ dns_over_https:
|
|||
#### Output
|
||||
|
||||
```console
|
||||
foo@bar:~$ git switch --detach v1.1_081
|
||||
foo@bar:~$ git switch --detach v1.1_082
|
||||
foo@bar:~$ rougail -m firefox/ --modes_level basic standard advanced -u yaml -ff config/02/config.yaml
|
||||
```
|
||||
<pre>╭────────────── Caption ───────────────╮
|
||||
|
|
@ -362,6 +373,68 @@ Variables:
|
|||
<span style="color: #5c5cff"> </span><span style="color: #5c5cff">┣━━ </span>📓 Enable DNS over HTTPS: true ◀ loaded from the YAML file "config/02/config.yaml" (⏳ <span style="color: #00aa00">false</span>)
|
||||
<span style="color: #5c5cff"> </span><span style="color: #5c5cff">┗━━ </span>📓 Use Provider: <span style="color: #ffd700">Cloudflare</span>
|
||||
</pre>
|
||||
### Example 3
|
||||
|
||||
#### config/03/config.yaml
|
||||
|
||||
|
||||
- [[tutorial v1.1_082] A web_address variable ](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_082/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_082~1..v1.1_082))
|
||||
```yml
|
||||
---
|
||||
dns_over_https:
|
||||
enable_dns_over_https: true
|
||||
provider: Custom
|
||||
custom_dns_url: http://dns.net
|
||||
|
||||
```
|
||||
#### Output
|
||||
|
||||
```console
|
||||
foo@bar:~$ git switch --detach v1.1_082
|
||||
foo@bar:~$ rougail -m firefox/ --modes_level basic standard advanced -u yaml -ff config/03/config.yaml
|
||||
```
|
||||
<pre>╭────────────── Caption ───────────────╮
|
||||
│ Variable <span style="color: #ffd700">Default value</span> │
|
||||
│ Modified value │
|
||||
│ (<span style="color: #00aa00">⏳ Original default value</span>) │
|
||||
╰──────────────────────────────────────╯
|
||||
Variables:
|
||||
<span style="color: #5c5cff">┣━━ </span>📓 Configure Proxy Access to the Internet: <span style="color: #ffd700">No proxy</span>
|
||||
<span style="color: #5c5cff">┗━━ </span>📂 DNS over HTTPS
|
||||
<span style="color: #5c5cff"> </span><span style="color: #5c5cff">┣━━ </span>📓 Enable DNS over HTTPS: true ◀ loaded from the YAML file "config/03/config.yaml" (⏳ <span style="color: #00aa00">false</span>)
|
||||
<span style="color: #5c5cff"> </span><span style="color: #5c5cff">┣━━ </span>📓 Use Provider: Custom ◀ loaded from the YAML file "config/03/config.yaml" (⏳ <span style="color: #00aa00">Cloudflare</span>)
|
||||
<span style="color: #5c5cff"> </span><span style="color: #5c5cff">┗━━ </span>📓 Custom DNS URL: http://dns.net ◀ loaded from the YAML file "config/03/config.yaml"
|
||||
</pre>
|
||||
### Example 4
|
||||
|
||||
#### config/04/config.yaml
|
||||
|
||||
|
||||
```yml
|
||||
---
|
||||
dns_over_https:
|
||||
enable_dns_over_https: true
|
||||
provider: Custom
|
||||
custom_dns_url: https://dns.net
|
||||
|
||||
```
|
||||
#### Output
|
||||
|
||||
```console
|
||||
foo@bar:~$ git switch --detach v1.1_082
|
||||
foo@bar:~$ rougail -m firefox/ --modes_level basic standard advanced -u yaml -ff config/04/config.yaml
|
||||
```
|
||||
<pre>╭────────────── Caption ───────────────╮
|
||||
│ Variable <span style="color: #ffd700">Default value</span> │
|
||||
│ Modified value │
|
||||
│ (<span style="color: #00aa00">⏳ Original default value</span>) │
|
||||
╰──────────────────────────────────────╯
|
||||
Variables:
|
||||
<span style="color: #5c5cff">┣━━ </span>📓 Configure Proxy Access to the Internet: <span style="color: #ffd700">No proxy</span>
|
||||
<span style="color: #5c5cff">┗━━ </span>📂 DNS over HTTPS
|
||||
<span style="color: #5c5cff"> </span><span style="color: #5c5cff">┣━━ </span>📓 Enable DNS over HTTPS: true ◀ loaded from the YAML file "config/04/config.yaml" (⏳ <span style="color: #00aa00">false</span>)
|
||||
<span style="color: #5c5cff"> </span><span style="color: #5c5cff">┣━━ </span>📓 Use Provider: Custom ◀ loaded from the YAML file "config/04/config.yaml" (⏳ <span style="color: #00aa00">Cloudflare</span>)
|
||||
<span style="color: #5c5cff"> </span><span style="color: #5c5cff">┗━━ </span>📓 Custom DNS URL: https://dns.net ◀ loaded from the YAML file "config/04/config.yaml"
|
||||
</pre>
|
||||
|
||||
|
||||
- [[tutorial v1.1_083] A variable with custom validation](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_083/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_083~1..v1.1_083))
|
||||
|
|
|
|||
5
config/03/config.yaml
Normal file
5
config/03/config.yaml
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
dns_over_https:
|
||||
enable_dns_over_https: true
|
||||
provider: Custom
|
||||
custom_dns_url: http://dns.net
|
||||
12
config/03/output_ro.html
Normal file
12
config/03/output_ro.html
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<pre>╭────────────── Caption ───────────────╮
|
||||
│ Variable <span style="color: #ffd700">Default value</span> │
|
||||
│ Modified value │
|
||||
│ (<span style="color: #00aa00">⏳ Original default value</span>) │
|
||||
╰──────────────────────────────────────╯
|
||||
Variables:
|
||||
<span style="color: #5c5cff">┣━━ </span>📓 Configure Proxy Access to the Internet: <span style="color: #ffd700">No proxy</span>
|
||||
<span style="color: #5c5cff">┗━━ </span>📂 DNS over HTTPS
|
||||
<span style="color: #5c5cff"> </span><span style="color: #5c5cff">┣━━ </span>📓 Enable DNS over HTTPS: true ◀ loaded from the YAML file "config/03/config.yaml" (⏳ <span style="color: #00aa00">false</span>)
|
||||
<span style="color: #5c5cff"> </span><span style="color: #5c5cff">┣━━ </span>📓 Use Provider: Custom ◀ loaded from the YAML file "config/03/config.yaml" (⏳ <span style="color: #00aa00">Cloudflare</span>)
|
||||
<span style="color: #5c5cff"> </span><span style="color: #5c5cff">┗━━ </span>📓 Custom DNS URL: http://dns.net ◀ loaded from the YAML file "config/03/config.yaml"
|
||||
</pre>
|
||||
5
config/04/config.yaml
Normal file
5
config/04/config.yaml
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
dns_over_https:
|
||||
enable_dns_over_https: true
|
||||
provider: Custom
|
||||
custom_dns_url: https://dns.net
|
||||
12
config/04/output_ro.html
Normal file
12
config/04/output_ro.html
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<pre>╭────────────── Caption ───────────────╮
|
||||
│ Variable <span style="color: #ffd700">Default value</span> │
|
||||
│ Modified value │
|
||||
│ (<span style="color: #00aa00">⏳ Original default value</span>) │
|
||||
╰──────────────────────────────────────╯
|
||||
Variables:
|
||||
<span style="color: #5c5cff">┣━━ </span>📓 Configure Proxy Access to the Internet: <span style="color: #ffd700">No proxy</span>
|
||||
<span style="color: #5c5cff">┗━━ </span>📂 DNS over HTTPS
|
||||
<span style="color: #5c5cff"> </span><span style="color: #5c5cff">┣━━ </span>📓 Enable DNS over HTTPS: true ◀ loaded from the YAML file "config/04/config.yaml" (⏳ <span style="color: #00aa00">false</span>)
|
||||
<span style="color: #5c5cff"> </span><span style="color: #5c5cff">┣━━ </span>📓 Use Provider: Custom ◀ loaded from the YAML file "config/04/config.yaml" (⏳ <span style="color: #00aa00">Cloudflare</span>)
|
||||
<span style="color: #5c5cff"> </span><span style="color: #5c5cff">┗━━ </span>📓 Custom DNS URL: https://dns.net ◀ loaded from the YAML file "config/04/config.yaml"
|
||||
</pre>
|
||||
Loading…
Reference in a new issue