Skip to content

Commit d9ce9bd

Browse files
committed
Documentation
1 parent 54d0a99 commit d9ce9bd

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

docs/customization.md

+9-7
Original file line numberDiff line numberDiff line change
@@ -170,18 +170,20 @@ Then, e.g. to override the site title, add the following lines to `main.html`:
170170
{% endblock %}
171171
```
172172

173-
If you intend to add some code to a block rather than to replace it altogether with new content, use `{{ super() }}` right after the `{% block %}` statement to include the original block content. This is particularly useful when adding some third-party widgets to your docs, e.g., for chatting with support or submitting a ticket. For example, if your widget script is hosted on `widgets.example.com`, add the following lines to `main.html`:
173+
If you intend to __add__ something to a block rather than to replace it
174+
altogether with new content, use `{{ super() }}` inside the block to include the
175+
original block content. This is particularly useful when adding third-party
176+
scripts to your docs, e.g.
174177

175-
```html
178+
``` html
176179
{% extends "base.html" %}
177180
178181
{% block scripts %}
179-
180-
{{ super() }}
181-
182-
<script id="snippet" src="https://widgets.example.com/snippet.js> </script>
183-
182+
<!-- Add scripts that need to run before here -->
183+
{{ super() }}
184+
<!-- Add scripts that need to run afterwards here -->
184185
{% endblock %}
186+
```
185187

186188
The following template blocks are provided by the theme:
187189

0 commit comments

Comments
 (0)