Show links to related posts
Enter note titles in `page.related` and add `use: [notes]` to include links to related notes.
This commit is contained in:
parent
b8c90e893c
commit
5baae90010
|
@ -32,4 +32,18 @@
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if page.related and data.notes %}
|
||||||
|
<section>
|
||||||
|
<h2>Related</h2>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
{% for note in data.notes if page.related|filter((title) => title == note.title) %}
|
||||||
|
<li>
|
||||||
|
<a href="{{ note.url|trim('/', 'right') }}">{{ note.title }}</a>
|
||||||
|
</li>
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
</section>
|
||||||
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
Loading…
Reference in a new issue