Make use of proper relURL everywhere so site works in sub directory. Fix for setting custom height in figure shortcode.

This commit is contained in:
Fredrik Jonsson 2017-11-24 11:39:58 +01:00
commit 73cc0bfc89

View file

@ -1,11 +1,12 @@
{{ $home := relURL "/" }}
{{ $currentSection := .Section }}
{{ $currentID := .UniqueID }}
<nav class="main-menu layout__navigation" role="navigation">
<h2 class="visually-hidden">{{ i18n "menu_title" }}</h2>
<ul class="navbar">
<li><a class="{{ if .IsHome }}active{{ end }}" href="/">{{ i18n "menu_home" }}</a></li>
<li><a class="{{ if .IsHome }}active{{ end }}" href="{{ $home }}">{{ i18n "menu_home" }}</a></li>
{{ range where .Site.Pages "Section" "" -}}
{{ if ne .RelPermalink "/" -}}
{{ if ne .RelPermalink (string $home) -}}
<li><a class="{{ if eq $currentID .UniqueID }}active{{ end }}" href="{{ .RelPermalink }}">{{ .Title }}</a></li>
{{ end -}}
{{ end -}}