Kaynağa Gözat

Fix broken internal links in hamburger menu (#613)

Fabio Souto 7 yıl önce
ebeveyn
işleme
7ee936f46d
1 değiştirilmiş dosya ile 5 ekleme ve 1 silme
  1. 5 1
      docs/_includes/nav/header_nav.html

+ 5 - 1
docs/_includes/nav/header_nav.html

@@ -6,7 +6,11 @@
     <ul>
     <ul>
       {% for item in site.data.nav %}
       {% for item in site.data.nav %}
       <li class="navItem">
       <li class="navItem">
-        <a href="{{ item.href }}"{% if item.category == "external" %} target="_blank"{% endif %}>{{ item.title }}</a>
+        {% if item.category == "external" %}
+          <a href="{{ item.href }}"  target="_blank">{{ item.title }}</a>
+        {% else %}
+          <a href="{{ item.href | relative_url }}">{{ item.title }}</a>
+        {% endif %}
       </li>
       </li>
       {% endfor %}
       {% endfor %}
       {% if site.searchconfig %}
       {% if site.searchconfig %}