Skip to content

Commit c32cc88

Browse files
author
Mykolas Mankevicius
committed
fix documentation page
1 parent 89adbd9 commit c32cc88

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

docs/index.md

+12-10
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,20 @@
88
You can configure the addon by visiting CP > Addons > Dynamic Token:
99

1010
* **Refresh interval** - an interval for updating your csrf token every `n` minutes.
11-
* **CSS Selector** - If you want to change the default selector, **note** this will break `{{ form:create }}`.
11+
* **CSS Selector** - If you want to change the default selector, **note** this will break `{{ "{{ form:create " }}}}`.
1212

1313
## Usage
1414

1515
* disable CSRF verification by adding `/!/DynamicToken` to the `csrf_exclude` array in `site/settings/system.yaml`. Don't worry we check that the referrer is comming from your `APP_URL`, but this still carries its own risks.
16-
* add a `\{\{ dynamic_token }}` to your layout file just before `</body>` tag.
16+
* add a `{{ "{{ dynamic_token " }}}}` to your layout file just before `</body>` tag.
1717
* add an `APP_URL=<your_site_url>` to your `.env` file.
1818
e.g.:`APP_URL=site.com`
1919
local development: `APP_URL=localhost`
2020

2121
## Examples
2222

2323
```
24+
{% raw %}
2425
<!DOCTYPE html>
2526
<html lang="en">
2627
<head>
@@ -31,18 +32,19 @@ local development: `APP_URL=localhost`
3132
</head>
3233
<body>
3334
34-
\{\{ form:create in="superfans" }}
35-
\{\{ fields }}
36-
<label>\{\{ display }}
37-
<input type="text" name="\{\{ field }}" value="\{\{ old }}" \/\>
38-
</label>
39-
\{\{ /fields }}
40-
\{\{ /form:create }}
35+
{{ form:create in="superfans" }}
36+
{{ fields }}
37+
<label>{{ display }}
38+
<input type="text" name="{{ field }}" value="{{ old }}" \>
39+
</label>
40+
{{ /fields }}
41+
{{ /form:create }}
4142
42-
\{\{ dynamic_token }}
43+
{{ dynamic_token }}
4344
4445
</body>
4546
</html>
47+
{% endraw %}
4648
```
4749

4850
## License

0 commit comments

Comments
 (0)