Fix list appearance by adding missing `ol` tag (#6421)
Merge pull request 6421
This commit is contained in:
parent
b13a6161ed
commit
2b9bb2306a
|
@ -94,18 +94,22 @@ Suppose you wanted to sort the list by the `title`. To do this, convert the refe
|
||||||
{% raw %}
|
{% raw %}
|
||||||
```liquid
|
```liquid
|
||||||
{% assign doclist = site.data.samplelist.docs | sort: 'title' %}
|
{% assign doclist = site.data.samplelist.docs | sort: 'title' %}
|
||||||
|
<ol>
|
||||||
{% for item in doclist %}
|
{% for item in doclist %}
|
||||||
<li><a href="{{ item.url }}" alt="{{ item.title }}">{{ item.title }}</a></li>
|
<li><a href="{{ item.url }}" alt="{{ item.title }}">{{ item.title }}</a></li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
</ol>
|
||||||
```
|
```
|
||||||
{% endraw %}
|
{% endraw %}
|
||||||
|
|
||||||
**Result**
|
**Result**
|
||||||
|
|
||||||
<div class="highlight result">
|
<div class="highlight result">
|
||||||
|
<ol>
|
||||||
<li><a href="#" alt="Configuration">Configuration</a></li>
|
<li><a href="#" alt="Configuration">Configuration</a></li>
|
||||||
<li><a href="#" alt="Deployment">Deployment</a></li>
|
<li><a href="#" alt="Deployment">Deployment</a></li>
|
||||||
<li><a href="#" alt="Introduction">Introduction</a></li>
|
<li><a href="#" alt="Introduction">Introduction</a></li>
|
||||||
|
</ol>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
The items now appear in alphabetical order. The `sort` property in the Liquid filter applies to the `title`, which is an actual property in the list. If `title` weren't a property, we would need to sort by another property.
|
The items now appear in alphabetical order. The `sort` property in the Liquid filter applies to the `title`, which is an actual property in the list. If `title` weren't a property, we would need to sort by another property.
|
||||||
|
|
Loading…
Reference in New Issue