Introduce a struct for child members and use that instead of string names.
This commit is contained in:
@@ -82,12 +82,12 @@
|
||||
<p class="title"><a href="{{ relative_root | safe }}{{ page.parent.url }}">{{ page.parent.name }}</a></p>
|
||||
<ul>
|
||||
{% for child in page.parent.children %}
|
||||
<li{% if child == page.name %} class="highlight"{% endif %}>
|
||||
<a href="{% if page.is_directory %}../{% endif %}{{ child }}">{{ child | file_stem }}</a>
|
||||
{% if page.is_directory and child == page.name %}
|
||||
<li{% if child.name == page.name %} class="highlight"{% endif %}>
|
||||
<a href="{% if page.is_directory %}../{% endif %}{{ child.name }}">{{ child.title }}</a>
|
||||
{% if page.is_directory and child.name == page.name %}
|
||||
<ul>
|
||||
{% for child in page.children %}
|
||||
<li><a href="{{ child }}">{{ child | file_stem }}</a></li>
|
||||
<li><a href="{{ child.name }}">{{ child.title }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
@@ -100,7 +100,7 @@
|
||||
<p class="title"><a href="{{ relative_root | safe }}{{ page.url }}">{{ page.name }}</a></p>
|
||||
<ul>
|
||||
{% for child in page.children %}
|
||||
<li><a href="{{ child }}">{{ child | file_stem }}</a></li>
|
||||
<li><a href="{{ child.name }}">{{ child.title }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user