Page permalink can be an outside url (#2863)
Fixes #2858 --------- Signed-off-by: George Araújo <george.gcac@gmail.com>
This commit is contained in:
parent
c170eaf2d0
commit
1c1632c8c9
@ -87,7 +87,10 @@
|
|||||||
{% if child.title == 'divider' %}
|
{% if child.title == 'divider' %}
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
{% else %}
|
{% else %}
|
||||||
<a class="dropdown-item {% if page.title == child.title %}active{% endif %}" href="{{ child.permalink | relative_url }}">
|
<a
|
||||||
|
class="dropdown-item {% if page.title == child.title %}active{% endif %}"
|
||||||
|
href="{% if child.permalink contains '://' %}{{ child.permalink }}{% else %}{{ child.permalink | relative_url }}{% endif %}"
|
||||||
|
>
|
||||||
{{- child.title -}}
|
{{- child.title -}}
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -97,7 +100,13 @@
|
|||||||
{% else %}
|
{% else %}
|
||||||
{% assign parent_link = p.permalink | remove: 'index.html' %}
|
{% assign parent_link = p.permalink | remove: 'index.html' %}
|
||||||
<li class="nav-item {% if page.url contains parent_link %}active{% endif %}">
|
<li class="nav-item {% if page.url contains parent_link %}active{% endif %}">
|
||||||
{% if p.permalink contains '/blog/' %}{% assign url = '/blog/' %} {% else %}{% assign url = p.url %}{% endif %}
|
{%- if p.permalink contains '://' -%}
|
||||||
|
{%- assign url = p.permalink -%}
|
||||||
|
{%- elsif p.permalink contains '/blog/' -%}
|
||||||
|
{%- assign url = '/blog/' -%}
|
||||||
|
{%- else -%}
|
||||||
|
{%- assign url = p['url-'] %}
|
||||||
|
{%- endif %}
|
||||||
<a class="nav-link" href="{{ url | relative_url }}">
|
<a class="nav-link" href="{{ url | relative_url }}">
|
||||||
{{- p.title }}
|
{{- p.title }}
|
||||||
{% if page.url contains p.url %}
|
{% if page.url contains p.url %}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user