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:
parent
aca6312503
commit
73cc0bfc89
5 changed files with 21 additions and 12 deletions
|
|
@ -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 -}}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{{ .Hugo.Generator }}
|
||||
{{ with $.Param "contact" }}<meta name="contact" content="{{ . }}">{{ end }}
|
||||
<link rel="canonical" href="{{ .Permalink }}">
|
||||
<link rel="apple-touch-icon" href="/apple-touch-icon.png">
|
||||
<link rel="apple-touch-icon" href="{{ "/apple-touch-icon.png" | relURL }}">
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
<link rel="preload" as="style" href="/css/styles.css{{ if $.Param "cacheBustCSS" }}?{{ readFile "/public/css/styles.css" | sha1 }}{{ end }}">
|
||||
<link rel="stylesheet" href="/css/styles.css{{ if $.Param "cacheBustCSS" }}?{{ readFile "/public/css/styles.css" | sha1 }}{{ end }}">
|
||||
<link rel="stylesheet" href="/css/print.css" media="print">
|
||||
<link rel="preload" as="style" href="{{ "/css/styles.css" | relURL }}{{ if $.Param "cacheBustCSS" }}?{{ readFile "/public/css/styles.css" | sha1 }}{{ end }}">
|
||||
<link rel="stylesheet" href="{{ "/css/styles.css" | relURL }}{{ if $.Param "cacheBustCSS" }}?{{ readFile "/public/css/styles.css" | sha1 }}{{ end }}">
|
||||
<link rel="stylesheet" href="{{ "/css/print.css" | relURL }}" media="print">
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
{{ if $.Param "jquery" }}<script src="/js/jquery.slim.min.js"></script>{{ end }}
|
||||
{{ if $.Param "jquery" }}<script src="{{ "/js/jquery.slim.min.js" | relURL }}"></script>{{ end }}
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
{{ if $.Param "jquery" }}<script src="/js/script.js{{ if $.Param "cacheBustJS" }}?{{ readFile "/public/js/script.js" | sha1 }}{{ end }}"></script>{{ end }}
|
||||
{{ if $.Param "jquery" }}<script src="{{ "/js/script.js" | relURL }}{{ if $.Param "cacheBustJS" }}?{{ readFile "/public/js/script.js" | sha1 }}{{ end }}"></script>{{ end }}
|
||||
|
|
|
|||
Loading…
Reference in a new issue