Explain how to override output collection index page (#6424)
Merge pull request 6424
This commit is contained in:
parent
1bb36ebc9e
commit
b3d607f264
|
@ -87,6 +87,20 @@ For example, if you have `_my_collection/some_subdir/some_doc.md`,
|
|||
it will be rendered using Liquid and the Markdown converter of your
|
||||
choice and written out to `<dest>/my_collection/some_subdir/some_doc.html`.
|
||||
|
||||
If you wish a specific page to be shown when accessing `/my_collection/`,
|
||||
simply add `permalink: /my_collection/index.html` to a page.
|
||||
To list items from the collection, on that page or any other, you can use:
|
||||
|
||||
{% raw %}
|
||||
```liquid
|
||||
{% for item in site.my_collection %}
|
||||
<h2>{{ item.title }}</h2>
|
||||
<p>{{ item.description }}</p>
|
||||
<p><a href="{{ item.url }}">{{ item.title }}</a></p>
|
||||
{% endfor %}
|
||||
```
|
||||
{% endraw %}
|
||||
|
||||
<div class="note info">
|
||||
<h5>Don't forget to add YAML for processing</h5>
|
||||
<p>
|
||||
|
|
Loading…
Reference in New Issue