Skip to content

Commit 3d5ecc9

Browse files
authored
Merge pull request #278 from joariasl/hotfix/navar-links-references-no-index
Fix navbar links `navigation.html` for no `index.html` pages
2 parents 6d3baf4 + 8498a8d commit 3d5ecc9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

_includes/navigation.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<div class="container">
55
<a
66
class="navbar-brand page-scroll"
7-
href="{% if page.section-type == 'index' %}#page-top{% else %}{{ '/' | absolute_url }}{% endif %}"
7+
href="{% if page.section-type == 'index' %}#page-top{% else %}{{ '/' | relative_url }}{% endif %}"
88
aria-controls="navbarNav"
99
aria-label="Collapse navigation"
1010
>
@@ -35,9 +35,9 @@
3535
{% if p[1] == "latest-post" %} {% if page.url == "/blog/index.html" %}
3636
<a class="nav-link page-scroll" href="#page">{{ p[0] }}</a>
3737
{% else %}
38-
<a class="nav-link pe-2 ps-2" href="{{ '/blog/' | absolute_url }}">{{ p[0] }}</a>
38+
<a class="nav-link pe-2 ps-2" href="{{ '/blog/' | relative_url }}">{{ p[0] }}</a>
3939
{% endif %} {% else %}
40-
<a class="nav-link pe-2 ps-2" href="{{ '/#' | absolute_url }}{{ p[1] }}">{{ p[0] }}</a>
40+
<a class="nav-link pe-2 ps-2" href="{{ '/' | relative_url }}#{{ p[1] }}">{{ p[0] }}</a>
4141
{% endif %}
4242
</li>
4343
{% endfor %}

0 commit comments

Comments
 (0)