Render asset urls to absURL (#47)

This commit is contained in:
Hanzei 2018-06-09 23:23:55 +02:00 committed by Vicky Lai
parent a1de3cf3aa
commit 71a72311ac
2 changed files with 9 additions and 10 deletions

View file

@ -103,9 +103,9 @@
{{ if .Site.Params.localTime }} {{ if .Site.Params.localTime }}
<p>My current local time is <span id="time"></span>.</p> <p>My current local time is <span id="time"></span>.</p>
<script type="text/javascript" src="/js/moment.js"></script> <script type="text/javascript" src={{ "js/moment.js" | absURL }}></script>
<script type="text/javascript" src="/js/moment-timezone.js"></script> <script type="text/javascript" src={{ "js/moment-timezone.js" | absURL }}></script>
<script type="text/javascript" src="/js/moment-timezone-with-data-2012-2022.js"></script> <script type="text/javascript" src={{ "js/moment-timezone-with-data-2012-2022.js" | absURL }}></script>
<script> <script>
$(document).ready(function() { $(document).ready(function() {

View file

@ -34,17 +34,16 @@
{{ end }} {{ end }}
<!-- jQuery --> <!-- jQuery -->
<script type="text/javascript" src="/js/jquery-3.3.1.min.js"></script> <script type="text/javascript" src={{ "js/jquery-3.3.1.min.js"| absURL }}></script>
<!-- Fonts and icon CSS --> <!-- Fonts and icon CSS -->
<link rel="stylesheet" href="/css/font-awesome.min.css"> <link rel="stylesheet" href={{ "css/font-awesome.min.css" | absURL }}>
<link rel="stylesheet" href="/css/nunito_sans.css"> <link rel="stylesheet" href={{ "css/nunito_sans.css" | absURL }}>
{{ if .Site.Params.cacheBuster }} {{ if .Site.Params.cacheBuster }}
{{ $t := now.Unix }} <link rel="stylesheet" href="{{ (printf "css/%s-style.css?t=%d" (.Site.Params.themeStyle | default "dark") now.Unix) |relURL }}">
<link rel="stylesheet" href="css/{{ .Site.Params.themeStyle | default "dark" }}-style.css?t={{$t}}">
{{ else }} {{ else }}
<link rel="stylesheet" href="css/{{ .Site.Params.themeStyle | default "dark" }}-style.css"> <link rel="stylesheet" href="{{ (printf "css/%s-style.css" .Site.Params.themeStyle | default "dark") | absURL }}">
{{ end }} {{ end }}
<!-- Custom css --> <!-- Custom css -->
@ -53,7 +52,7 @@
{{- end }} {{- end }}
<!-- Icon --> <!-- Icon -->
<link rel="shortcut icon" href="{{ .Site.Params.faviconFile | default "img/favicon.ico" }}"> <link rel="shortcut icon" href="{{ .Site.Params.faviconFile | default "img/favicon.ico" | absURL }}">
<!-- Google Analytics --> <!-- Google Analytics -->
{{ template "_internal/google_analytics_async.html" . }} {{ template "_internal/google_analytics_async.html" . }}