Skip to content

Commit

Permalink
Patch 1 (#875)
Browse files Browse the repository at this point in the history
* Update _index.md

* Update _index.md

* Update _index.md
  • Loading branch information
3tilley authored Nov 22, 2023
1 parent 69a76e7 commit 290889e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/content/docs/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -633,6 +633,9 @@ You can also provide a list of templates that are checked for existence before i
{% include ["special_sidebar.html", "sidebar.html"] ignore missing %}
```

Note: `include` works similar to how it does in other engines like Jinja, with the exception that the current version of Tera doesn't allow inheritance within included files. Practically
speaking this means you have to choose between using `include`s or `extends` to organise your site, without mixing them.

### Macros

Think of macros as functions or components that you can call and return some text.
Expand Down Expand Up @@ -762,6 +765,11 @@ which also contains a `super()` so we render the `hey` block of the `grandparent

The end result of that rendering (not counting whitespace) will be: "dad says hi and grandma says hello sincerely with love".

This example explicitly terminates named blocks with `{% endblock hey %}`. It's not required to give the name of the block
being terminated `{% endblock %}`, though it may add some clarity.

See the note in the [Include](@/docs/_index.md#include) section regarding mixing inheritance and includes.

## Built-ins

### Built-in filters
Expand Down

0 comments on commit 290889e

Please sign in to comment.