docs(sequence): multiple values
ready for proofreading
This commit is contained in:
parent
d73e0ee259
commit
a621c1ed23
1 changed files with 75 additions and 1 deletions
|
|
@ -129,9 +129,83 @@ And the Rougail output is:
|
|||
┗━━ 📓 color (Color): #66cc66 ◀ loaded from the YAML file
|
||||
"config/02/config.yml"
|
||||
|
||||
.. type-along:: A sequence with multiple user data
|
||||
|
||||
We will now look at the same `proxies` sequence variable,
|
||||
to which multiple values are assigned:
|
||||
|
||||
.. extinclude:: https://forge.cloud.silique.fr/stove/rougail-tutorials/raw/commit/v1.1_190/config/03/config.yml
|
||||
:language: yaml
|
||||
:caption: A :file:`config/03/config.yml` user data file with multiple values
|
||||
|
||||
..
|
||||
---
|
||||
foxyproxy:
|
||||
proxies:
|
||||
- title: My company
|
||||
color: '#66cc66'
|
||||
- title: An other company
|
||||
color: '#cc66cc'
|
||||
- title: WPAD
|
||||
color: '#1166cc'
|
||||
|
||||
|
||||
Which we could write in JSON like this:
|
||||
|
||||
.. code-block:: json
|
||||
|
||||
[
|
||||
{
|
||||
"title": "My company",
|
||||
"color": "#66cc66"
|
||||
},
|
||||
{
|
||||
"title": "An other company",
|
||||
"color": "#cc66cc"
|
||||
},
|
||||
{
|
||||
"title": "WPAD",
|
||||
"color": "#1166cc"
|
||||
}
|
||||
|
||||
]
|
||||
|
||||
|
||||
And now we can clearly see that this `proxies` variable of type `sequence`
|
||||
is a container for lists of values of the same shape,
|
||||
and which contain the same number of elements:
|
||||
|
||||
.. raw:: html
|
||||
:class: output
|
||||
:url: https://forge.cloud.silique.fr/stove/rougail-tutorials/raw/commit/v1.1_190/config/03/output_ro.html
|
||||
|
||||
..
|
||||
Variables:
|
||||
┣━━ 📂 firefox (Firefox)
|
||||
┃ ┣━━ 📓 proxy_mode (Configure Proxy Access to the Internet): No proxy
|
||||
┃ ┗━━ 📂 dns_over_https (DNS over HTTPS)
|
||||
┃ ┗━━ 📓 enable_dns_over_https (Enable DNS over HTTPS): false
|
||||
┗━━ 📂 foxyproxy (FoxyProxy)
|
||||
┗━━ 📂 proxies (Proxy configuration)
|
||||
┣━━ 📂 title (Title or Description)
|
||||
┃ ┣━━ 📓 title (Title or Description): My company ◀ loaded from the
|
||||
┃ ┃ YAML file "config/03/config.yml"
|
||||
┃ ┗━━ 📓 color (Color): #66cc66 ◀ loaded from the YAML file
|
||||
┃ "config/03/config.yml"
|
||||
┣━━ 📂 title (Title or Description)
|
||||
┃ ┣━━ 📓 title (Title or Description): An other company ◀ loaded from
|
||||
┃ ┃ the YAML file "config/03/config.yml"
|
||||
┃ ┗━━ 📓 color (Color): #cc66cc ◀ loaded from the YAML file
|
||||
┃ "config/03/config.yml"
|
||||
┗━━ 📂 title (Title or Description)
|
||||
┣━━ 📓 title (Title or Description): WPAD ◀ loaded from the YAML
|
||||
┃ file "config/03/config.yml"
|
||||
┗━━ 📓 color (Color): #1166cc ◀ loaded from the YAML file
|
||||
"config/03/config.yml"
|
||||
|
||||
.. seealso::
|
||||
|
||||
You can have a look at the Rougail format pages :ref:`Sequence of homogeneous elements <sequence_family>`
|
||||
To go further, you can have a look at the Rougail format pages :ref:`Sequence of homogeneous elements <sequence_family>`
|
||||
|
||||
.. keypoints:: let's review the key points
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue