Fix docs for get_url

Closes #1667
This commit is contained in:
Vincent Prouillet 2021-12-02 19:53:41 +01:00
parent 10a39e57ff
commit 769264e3e5

View file

@ -203,14 +203,14 @@ This can also be used to get the permalinks for static assets, for example if
we want to link to the file that is located at `static/css/app.css`:
```jinja2
{{/* get_url(path="static/css/app.css") */}}
{{/* get_url(path="css/app.css") */}}
```
By default, assets will not have a trailing slash. You can force one by passing `trailing_slash=true` to the `get_url` function.
An example is:
```jinja2
{{/* get_url(path="static/css/app.css", trailing_slash=true) */}}
{{/* get_url(path="css/app.css", trailing_slash=true) */}}
```
In the case of non-internal links, you can also add a cachebust of the format `?h=<sha256>` at the end of a URL