diff options
author | olOwOlo <26087907+olOwOlo@users.noreply.github.com> | 2017-08-31 00:18:22 +0800 |
---|---|---|
committer | olOwOlo <26087907+olOwOlo@users.noreply.github.com> | 2017-08-31 00:18:22 +0800 |
commit | 4a2676396cb0a991dae12018be96462b3eec27f5 (patch) | |
tree | 7cdf0c3d2b254bf84a9a46d2068c3d1fc5c2c602 /layouts/partials/scripts.html | |
parent | 553d15e15f3affdfda48686469309e01f2b994f7 (diff) |
fix: always use relURL
Diffstat (limited to 'layouts/partials/scripts.html')
-rw-r--r-- | layouts/partials/scripts.html | 13 |
1 files changed, 7 insertions, 6 deletions
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) -}} |