Make all links absolute so they respect the base URL

This commit is contained in:
Joe Hutchinson
2019-01-03 12:01:20 -05:00
parent b7cc31a1be
commit f8006aab61
6 changed files with 12 additions and 12 deletions

View File

@@ -12,12 +12,12 @@
<span></span>
</button>
<ul id="menu" class="hamburger-menu-overlay">
<li><a href="/" class="hamburger-menu-overlay-link">Home</a></li>
<li><a href="{{ .Site.BaseURL }}" class="hamburger-menu-overlay-link">Home</a></li>
{{ range where .Site.Pages "Params.displayinmenu" true }}
<li><a href="{{ .Permalink }}" class="hamburger-menu-overlay-link">{{ .Title }}</a></li>
{{ end }}
{{ range $key, $value := .Site.Taxonomies.categories }}
<li><a href="/categories/{{ $key | urlize }}" class="hamburger-menu-overlay-link">{{ $key | humanize }}</a></li>
<li><a href="{{ (printf "%s%s" "/categories/" ($key | urlize)) | absURL }}" class="hamburger-menu-overlay-link">{{ $key | humanize }}</a></li>
{{ end }}
</ul>
</div>