diff --git a/_includes/nav.html b/_includes/nav.html
index eaf91c8..08d7609 100644
--- a/_includes/nav.html
+++ b/_includes/nav.html
@@ -19,44 +19,14 @@
{% for childlink in link[1] %}
{% for linkparts in childlink %}
- {% capture before %}{{ linkparts[1] | split: "://" | first }}{% endcapture %}
- {% capture after %}{{ linkparts[1] | split: "://" | last }}{% endcapture %}
- {% assign internal = true %}
- {% if before != after %}
- {% if before == "http" or before == "https" %}
- {% assign internal = false %}
- {% endif %}
- {% endif %}
-
- {% if internal %}
- {% capture linkurl %}{{ site.baseurl }}/{{ linkparts[1] }}{% endcapture %}
- {% else %}
- {% capture linkurl %}{{ linkparts[1] }}{% endcapture %}
- {% endif %}
-
-
{{ linkparts[0] }}
+ {% include navbarlink.html link=linkparts %}
{% endfor %}
{% endfor %}
{% else %}
- {% capture before %}{{ link[1] | split: "://" | first }}{% endcapture %}
- {% capture after %}{{ link[1] | split: "://" | last }}{% endcapture %}
- {% assign internal = true %}
- {% if before != after %}
- {% if before == "http" or before == "https" %}
- {% assign internal = false %}
- {% endif %}
- {% endif %}
-
- {% if internal %}
- {% capture linkurl %}{{ site.baseurl }}/{{ link[1] }}{% endcapture %}
- {% else %}
- {% capture linkurl %}{{ link[1] }}{% endcapture %}
- {% endif %}
-
- {{ link[0] }}
+ {% include navbarlink.html link=link %}
{% endif %}
{% endfor %}