website/_includes/additional-reading.html (32 lines of code) (raw):
{% include vars.html %}
<div class="list-group mt-1">
<strong class="list-group-item bg-faded">
{{i18n.docs_additional_reading}}
</strong>
{% for item in include.items %}
{% if item.guide %}
{% assign match = site.data.guides | where: 'id', item.guide | first %}
{% assign path = match.pages[0].path %}
{% assign title = i18n.guides[match.id].title %}
{% assign description = i18n.guides[match.id].description %}
{% else %}
{% for guide in site.data.guides %}
{% assign match = guide.pages | where: 'path', item.page | first %}
{% if match %}
{% assign path = match.path %}
{% assign title = i18n[path].title %}
{% assign description = i18n[path].description %}
{% break %}
{% endif %}
{% endfor %}
{% endif %}
<a class="list-group-item list-group-item-action" href="{{url_base}}{{path}}">
<h5 class="list-group-item-heading">
{{title}}
</h5>
<p class="list-group-item-text text-muted">
{{description}}
</p>
</a>
{% endfor %}
</div>