diff options
Diffstat (limited to 'layouts/partials')
-rw-r--r-- | layouts/partials/head.html | 23 | ||||
-rw-r--r-- | layouts/partials/header.html | 2 | ||||
-rw-r--r-- | layouts/partials/scripts.html | 13 | ||||
-rw-r--r-- | layouts/partials/slideout.html | 2 |
4 files changed, 21 insertions, 19 deletions
diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 0310b16..0a93efb 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -43,19 +43,20 @@ {{ end -}} <!-- Favicon and Touch icons --> -<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png"> -<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png"> -<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png"> -<link rel="icon" href="/favicon.ico" /> -<link rel="manifest" href="/manifest.json"> -<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5"> +<link rel="apple-touch-icon" sizes="180x180" href="{{ "apple-touch-icon.png" | relURL }}"> +<link rel="icon" type="image/png" sizes="32x32" href="{{ "favicon-32x32.png" | relURL }}"> +<link rel="icon" type="image/png" sizes="16x16" href="{{ "favicon-16x16.png" | relURL }}"> +<link rel="icon" href="{{ "favicon.ico" | relURL }}" /> +<link rel="manifest" href="{{ "manifest.json" | relURL }}"> +<link rel="mask-icon" href="{{ "safari-pinned-tab.svg" | relURL }}" color="#5bbad5"> -<!-- Styles --> -<link href="/dist/even.v{{ .Site.Params.version }}.css" rel="stylesheet"> +<!-- Styles --> +{{ $themeVersion := .Site.Params.version }} +<link href="{{ relURL (printf "dist/even.v%s.css" $themeVersion) }}" rel="stylesheet"> {{ if .Site.Params.bootcdn -}} {{ if .Site.Params.fancybox }}<link href="https://cdn.bootcss.com/fancybox/3.1.20/jquery.fancybox.min.css" rel="stylesheet">{{ end }} {{ else -}} - {{ if .Site.Params.fancybox }}<link href="/lib/fancybox/jquery.fancybox-3.1.20.min.css" rel="stylesheet">{{ end }} + {{ if .Site.Params.fancybox }}<link href="{{ "lib/fancybox/jquery.fancybox-3.1.20.min.css" | relURL }}" rel="stylesheet">{{ end }} {{- end }} {{/* NOTE: These Hugo Internal Templates can be found starting at https://github.com/spf13/hugo/blob/master/tpl/tplimpl/template_embedded.go#L158 */}} @@ -66,6 +67,6 @@ <!-- Polyfill for old browsers --> {{ `<!--[if lt IE 9]> - <script src="//cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script> - <script src="//cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script> + <script src="https://cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script> + <script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script> <![endif]-->` | safeHTML }} diff --git a/layouts/partials/header.html b/layouts/partials/header.html index a8a555a..f41fdac 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -1,5 +1,5 @@ <div class="logo-wrapper"> - <a href="/" class="logo">{{ .Site.Title }}</a> + <a href="{{ "/" | relURL }}" class="logo">{{ .Site.Title }}</a> </div> <nav class="site-navbar"> diff --git a/layouts/partials/scripts.html b/layouts/partials/scripts.html index d1eefa8..b206dc8 100644 --- a/layouts/partials/scripts.html +++ b/layouts/partials/scripts.html @@ -1,16 +1,17 @@ <!-- js --> -<script src="/lib/highlight/highlight.pack.js"></script> +{{ $themeVersion := .Site.Params.version }} +<script src="{{ "lib/highlight/highlight.pack.js" | relURL }}"></script> {{ if .Site.Params.bootcdn -}} <!-- script src="https://cdn.bootcss.com/highlight.js/9.12.0/highlight.min.js"></script --> <script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script> <script type="text/javascript" src="https://cdn.bootcss.com/slideout/1.0.1/slideout.min.js"></script> {{ if .Site.Params.fancybox }}<script type="text/javascript" src="https://cdn.bootcss.com/fancybox/3.1.20/jquery.fancybox.min.js"></script>{{ end }} - <script type="text/javascript" src="/dist/even.v{{ .Site.Params.version }}.js"></script> + <script type="text/javascript" src="{{ relURL (printf "dist/even.v%s.js" $themeVersion) }}"></script> {{ else -}} - <script type="text/javascript" src="/lib/jquery/jquery-3.2.1.min.js"></script> - <script type="text/javascript" src="/lib/slideout/slideout-1.0.1.min.js"></script> - {{ if .Site.Params.fancybox }}<script type="text/javascript" src="/lib/fancybox/jquery.fancybox-3.1.20.min.js"></script>{{ end }} - <script type="text/javascript" src="/dist/even.v{{ .Site.Params.version }}.js"></script> + <script type="text/javascript" src="{{ "lib/jquery/jquery-3.2.1.min.js" | relURL }}"></script> + <script type="text/javascript" src="{{ "lib/slideout/slideout-1.0.1.min.js" | relURL }}"></script> + {{ if .Site.Params.fancybox }}<script type="text/javascript" src="{{ "lib/fancybox/jquery.fancybox-3.1.20.min.js" | relURL }}"></script>{{ end }} + <script type="text/javascript" src="{{ relURL (printf "dist/even.v%s.js" $themeVersion) }}"></script> {{- end }} {{ if and (and .Site.Params.mathjax (ne .Params.mathjax false)) (or .IsPage .IsHome) -}} diff --git a/layouts/partials/slideout.html b/layouts/partials/slideout.html index 4ec6344..0ebf0c2 100644 --- a/layouts/partials/slideout.html +++ b/layouts/partials/slideout.html @@ -1,6 +1,6 @@ <div id="mobile-navbar" class="mobile-navbar"> <div class="mobile-header-logo"> - <a href="/" class="logo">{{ .Site.Title }}</a> + <a href="{{ "/" | relURL }}" class="logo">{{ .Site.Title }}</a> </div> <div class="mobile-navbar-icon"> <span></span> |