docs: make it clear for extnames, see #214

This commit is contained in:
harttle
2020-04-03 23:08:09 +08:00
parent 5099b2a762
commit f6789f517c
4 changed files with 17 additions and 9 deletions
@@ -12,9 +12,9 @@ color: '{{ color }}' shape: '{{ shape }}'
// file: theme.liquid
{% assign shape = 'circle' %}
{% render 'color' %}
{% render 'color' with 'red' %}
{% render 'color', color: 'yellow', shape: 'square' %}
{% render 'color.liquid' %}
{% render 'color.liquid' with 'red' %}
{% render 'color.liquid', color: 'yellow', shape: 'square' %}
```
The output will be:
@@ -27,6 +27,10 @@ color: 'yellow' shape: 'square'
More details please refer to the [render](../tags/render.html) tag.
{% note tip The ".liquid" Extension %}
The ".liquid" extension in <code>layout</code>, <code>render</code> and <code>include</code> an be omitted if Liquid instance is created using `extname: ".liquid"` option. See <a href="./options.html#extname">the extname option</a> for details.
{% endnote %}
## Layout Templates (Extends)
For the following template files:
@@ -38,7 +42,7 @@ Header
Footer
// file: page.liquid
{% layout "default-layout" %}
{% layout "default-layout.liquid" %}
{% block content %}My page content{% endblock %}
```