Browse Source

Merge pull request #627 from JordanShurmer/patch-1

Fix minor documentation quirks in templates/overview
index-subcmd
Vincent Prouillet GitHub 5 years ago
parent
commit
bf95649e9a
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      docs/content/documentation/templates/overview.md

+ 3
- 3
docs/content/documentation/templates/overview.md View File

@@ -193,14 +193,14 @@ template:


#### Remote content #### Remote content


Instead of using a file, you can load data from a remote URL. This can be done by specifying a `url` parameter to `load_data` rather than `file`.
Instead of using a file, you can load data from a remote URL. This can be done by specifying a `url` parameter to `load_data` rather than `path`.


```jinja2 ```jinja2
{% set response = load_data(url="https://api.github.com/repos/getzola/zola") %} {% set response = load_data(url="https://api.github.com/repos/getzola/zola") %}
{{ response }} {{ response }}
``` ```


By default, the response body will be returned with no parsing. This can be changed by using the `format` argument as above.
By default, the response body will be returned with no parsing. This can be changed by using the `format` argument as below.




```jinja2 ```jinja2
@@ -213,7 +213,7 @@ By default, the response body will be returned with no parsing. This can be chan
Data file loading and remote requests are cached in memory during build, so multiple requests aren't made to the same endpoint. URLs are cached based on the URL, and data files are cached based on the files modified time. The format is also taken into account when caching, so a request will be sent twice if it's loaded with 2 different formats. Data file loading and remote requests are cached in memory during build, so multiple requests aren't made to the same endpoint. URLs are cached based on the URL, and data files are cached based on the files modified time. The format is also taken into account when caching, so a request will be sent twice if it's loaded with 2 different formats.


### `trans` ### `trans`
Gets the translation of the given `key`, for the `default_language` or the `language given
Gets the translation of the given `key`, for the `default_language` or the `lang`uage given


```jinja2 ```jinja2
{{/* trans(key="title") */}} {{/* trans(key="title") */}}


Loading…
Cancel
Save