Skip to content

Commit

Permalink
move 'base_url' to 'relative_url' 🤦
Browse files Browse the repository at this point in the history
  • Loading branch information
Pat Brown committed Oct 26, 2020
1 parent 02b6aba commit 09c2b13
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
{% endif %}
{% endunless %}

<link rel="shortcut icon" href="{{ 'favicon.ico' | base_url }}" type="image/x-icon">
<link rel="shortcut icon" href="{{ 'favicon.ico' | relative_url }}" type="image/x-icon">

<link rel="stylesheet" href="{{ '/assets/css/just-the-docs-default.css' | base_url }}">
<link rel="stylesheet" href="{{ '/assets/css/just-the-docs-default.css' | relative_url }}">

{% if site.ga_tracking != nil %}
<script async src="https://www.googletagmanager.com/gtag/js?id={{ site.ga_tracking }}"></script>
Expand All @@ -27,9 +27,9 @@
{% endif %}

{% if site.search_enabled != false %}
<script type="text/javascript" src="{{ '/assets/js/vendor/lunr.min.js' | base_url }}"></script>
<script type="text/javascript" src="{{ '/assets/js/vendor/lunr.min.js' | relative_url }}"></script>
{% endif %}
<script type="text/javascript" src="{{ '/assets/js/just-the-docs.js' | base_url }}"></script>
<script type="text/javascript" src="{{ '/assets/js/just-the-docs.js' | relative_url }}"></script>

<meta name="viewport" content="width=device-width, initial-scale=1">

Expand Down
10 changes: 5 additions & 5 deletions _includes/nav.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,31 +14,31 @@
{%- if node.parent == nil and node.title -%}
<li class="nav-list-item{% if page.url == node.url or page.parent == node.title or page.grand_parent == node.title %} active{% endif %}">
{%- if page.parent == node.title or page.grand_parent == node.title -%}
{%- assign first_level_url = node.url | base_url -%}
{%- assign first_level_url = node.url | relative_url -%}
{%- endif -%}
{%- if node.has_children -%}
<a href="#" class="nav-list-expander"><svg viewBox="0 0 24 24"><use xlink:href="#svg-arrow-right"></use></svg></a>
{%- endif -%}
<a href="{{ node.url | base_url }}" class="nav-list-link{% if page.url == node.url %} active{% endif %}">{{ node.title }}</a>
<a href="{{ node.url | relative_url }}" class="nav-list-link{% if page.url == node.url %} active{% endif %}">{{ node.title }}</a>
{%- if node.has_children -%}
{%- assign children_list = pages_list | where: "parent", node.title -%}
<ul class="nav-list ">
{%- for child in children_list -%}
{%- unless child.nav_exclude -%}
<li class="nav-list-item {% if page.url == child.url or page.parent == child.title %} active{% endif %}">
{%- if page.url == child.url or page.parent == child.title -%}
{%- assign second_level_url = child.url | base_url -%}
{%- assign second_level_url = child.url | relative_url -%}
{%- endif -%}
{%- if child.has_children -%}
<a href="#" class="nav-list-expander"><svg viewBox="0 0 24 24"><use xlink:href="#svg-arrow-right"></use></svg></a>
{%- endif -%}
<a href="{{ child.url | base_url }}" class="nav-list-link{% if page.url == child.url %} active{% endif %}">{{ child.title }}</a>
<a href="{{ child.url | relative_url }}" class="nav-list-link{% if page.url == child.url %} active{% endif %}">{{ child.title }}</a>
{%- if child.has_children -%}
{%- assign grand_children_list = pages_list | where: "parent", child.title | where: "grand_parent", node.title -%}
<ul class="nav-list">
{%- for grand_child in grand_children_list -%}
<li class="nav-list-item {% if page.url == grand_child.url %} active{% endif %}">
<a href="{{ grand_child.url | base_url }}" class="nav-list-link{% if page.url == grand_child.url %} active{% endif %}">{{ grand_child.title }}</a>
<a href="{{ grand_child.url | relative_url }}" class="nav-list-link{% if page.url == grand_child.url %} active{% endif %}">{{ grand_child.title }}</a>
</li>
{%- endfor -%}
</ul>
Expand Down

0 comments on commit 09c2b13

Please sign in to comment.