Merge 34061b5b550b0c7025fc5fd5a58566c7bb974406 into ea0b975d6a3791327fa95bba8a0dfbb07c8e9f01

This commit is contained in:
Johan Thelin 2025-03-14 08:18:05 +00:00 committed by GitHub
commit 22d490773c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -18,12 +18,13 @@ function to access databags.
## Supported Formats ## Supported Formats
Databags go into the `databags/` folder in your project. There are two Databags go into the `databags/` folder in your project. There are three
formats supported: key/value pairs as ini files as well as JSON files: formats supported: key/value pairs as ini files as well as JSON and YAML files:
| Extension | Format | Extension | Format
| --------- | -------- | --------- | --------
| `.json` | JSON | `.json` | JSON
| `.yaml` | YAML
| `.ini` | INI Files with or without sections | `.ini` | INI Files with or without sections
## Navigating Bags ## Navigating Bags
@ -31,8 +32,8 @@ formats supported: key/value pairs as ini files as well as JSON files:
Dotted notation is used to navigate into data bags which are globally Dotted notation is used to navigate into data bags which are globally
merged together. This means that if you have a file named `i18n.ini` merged together. This means that if you have a file named `i18n.ini`
with a section `[en]` and a key `CLICK_HERE` the path `i18n.en.CLICK_HERE` with a section `[en]` and a key `CLICK_HERE` the path `i18n.en.CLICK_HERE`
will target that key. For JSON files further nesting is possible. You will target that key. For JSON and YAML files further nesting is possible.
can also just target a section and the return value will be a dictionary You can also just target a section and the return value will be a dictionary
which can for instance be used with the [tojson :ref](../templates/filters/tojson/) which can for instance be used with the [tojson :ref](../templates/filters/tojson/)
filter. filter.