Simplify assigning classname to docs' aside-links (#7609)
Merge pull request 7609
This commit is contained in:
parent
9957e21be7
commit
079b7231d9
|
@ -5,11 +5,7 @@
|
|||
<ul>
|
||||
{% for item in section.docs %}
|
||||
{% assign p = site.documents | where: "url", item.link | first %}
|
||||
<li class="{% if p.url == '/docs/' %}
|
||||
{% if page.url == '/docs/' %}current{% endif %}
|
||||
{% else %}
|
||||
{% if page.url contains p.url %}current{% endif %}
|
||||
{% endif %}">
|
||||
<li {%- if page.url == p.url %} class="current" {%- endif %}>
|
||||
<a href="{{ p.url }}">
|
||||
{{ p.menu_name | default: p.title }}
|
||||
</a>
|
||||
|
|
Loading…
Reference in New Issue