mirror of
https://github.com/snachodog/just-the-docs.git
synced 2025-09-12 21:03:32 -06:00
Fix duplicated external links in collections (#1001)
Fix external links and collections The navigation should only display the external links once, after the links to pages that are not in collections. The test for PR #876 at https://just-the-docs.github.io/just-the-docs-tests/navigation/external-links fails with v0.4.0.rc3, and succeeds when the updated `nav.html` is added locally. The docs need updating to clarify how the interaction between the collections feature and the external links feature is resolved.
This commit is contained in:
@@ -183,15 +183,17 @@
|
||||
</li>
|
||||
{%- endunless -%}
|
||||
{%- endfor -%}
|
||||
{%- assign nav_external_links = site.nav_external_links -%}
|
||||
{%- for node in nav_external_links -%}
|
||||
<li class="nav-list-item external">
|
||||
<a href="{{ node.url | absolute_url }}" class="nav-list-link external">
|
||||
{{ node.title }}
|
||||
{% unless node.hide_icon %}<svg viewBox="0 0 24 24" aria-labelledby="svg-external-link-title"><use xlink:href="#svg-external-link"></use></svg>{% endunless %}
|
||||
</a>
|
||||
</li>
|
||||
{%- endfor -%}
|
||||
{%- unless include.key -%}
|
||||
{%- assign nav_external_links = site.nav_external_links -%}
|
||||
{%- for node in nav_external_links -%}
|
||||
<li class="nav-list-item external">
|
||||
<a href="{{ node.url | absolute_url }}" class="nav-list-link external">
|
||||
{{ node.title }}
|
||||
{% unless node.hide_icon %}<svg viewBox="0 0 24 24" aria-labelledby="svg-external-link-title"><use xlink:href="#svg-external-link"></use></svg>{% endunless %}
|
||||
</a>
|
||||
</li>
|
||||
{%- endfor -%}
|
||||
{%- endunless -%}
|
||||
</ul>
|
||||
|
||||
{%- comment -%}
|
||||
|
Reference in New Issue
Block a user