File tree Expand file tree Collapse file tree 1 file changed +20
-5
lines changed
Expand file tree Collapse file tree 1 file changed +20
-5
lines changed Original file line number Diff line number Diff line change 1212
1313 < div class ="collapse navbar-collapse " id ="main-navbar ">
1414 < ul class ="nav navbar-nav navbar-right ">
15- {% for link in site.navbar-links %}
15+ {% for link in site.navbar-links %}
16+ {% capture before %}{{ link[1] | split: "://" | first }}{% endcapture %}
17+ {% capture after %}{{ link[1] | split: "://" | last }}{% endcapture %}
1618 < li >
17- < a href ="{{ site.baseurl }}/{{ link[1] }} "> {{ link[0] }}</ a >
18- </ li >
19- {% endfor %}
19+ {% assign internal = true %}
20+ {% if before != after %}
21+ {% if before == "http" or before == "https" %}
22+ {% assign internal = false %}
23+ {% endif %}
24+ {% endif %}
25+
26+ {% if internal %}
27+ {% capture linkurl %}{{ site.baseurl }}/{{ link[1] }}{% endcapture %}
28+ {% else %}
29+ {% capture linkurl %}{{ link[1] }}{% endcapture %}
30+ {% endif %}
31+
32+ < a href ="{{ linkurl }} "> {{ link[0] }}</ a >
33+ </ li >
34+ {% endfor %}
2035 </ ul >
2136 </ div >
2237
3146 {% endif %}
3247
3348 </ div >
34- </ nav >
49+ </ nav >
You can’t perform that action at this time.
0 commit comments