Replace leading slash in some relURL

This commit is contained in:
Vincent Tam 2019-07-25 16:15:03 +02:00
parent e18c5c5429
commit 4f59157d5b
4 changed files with 14 additions and 14 deletions

View file

@ -132,11 +132,11 @@
{{ partial "js/owlCarousel.html" . }}
{{ if .Site.Params.home.localTime }}
{{ $momentjs := resources.Get "/vendor/momentjs/moment.min.js" }}
{{ $momentTimezone := resources.Get "/vendor/momentjs/moment-timezone.min.js" }}
{{ $momentTimezoneWithData := resources.Get "/vendor/momentjs/moment-timezone-with-data-2012-2022.min.js" }}
{{ $initMomentjs := resources.Get "/js/initMoment.js" | resources.ExecuteAsTemplate "js/initMoment.tmp.js" . }}
{{ $bundleMoment := slice $momentjs $momentTimezone $momentTimezoneWithData $initMomentjs | resources.Concat "/js/bundleMoment.js" | fingerprint }}
{{ $momentjs := resources.Get "vendor/momentjs/moment.min.js" }}
{{ $momentTimezone := resources.Get "vendor/momentjs/moment-timezone.min.js" }}
{{ $momentTimezoneWithData := resources.Get "vendor/momentjs/moment-timezone-with-data-2012-2022.min.js" }}
{{ $initMomentjs := resources.Get "js/initMoment.js" | resources.ExecuteAsTemplate "js/initMoment.tmp.js" . }}
{{ $bundleMoment := slice $momentjs $momentTimezone $momentTimezoneWithData $initMomentjs | resources.Concat "js/bundleMoment.js" | fingerprint }}
<script src="{{ $bundleMoment.Permalink }}" integrity="{{ $bundleMoment.Data.Integrity }}"></script>
{{ end }}
</body>

View file

@ -1,6 +1,6 @@
{{ $jQuery := resources.Get "/vendor/jquery/jquery-3.3.1.min.js" }}
{{ $index := resources.Get "/js/index.js" | minify }}
{{ $scripts := slice $jQuery $index | resources.Concat "/js/bundle.js" | fingerprint }}
{{ $jQuery := resources.Get "vendor/jquery/jquery-3.3.1.min.js" }}
{{ $index := resources.Get "js/index.js" | minify }}
{{ $scripts := slice $jQuery $index | resources.Concat "js/bundle.js" | fingerprint }}
<script src="{{ $scripts.Permalink }}" integrity="{{ $scripts.Data.Integrity }}"></script>
{{ template "_internal/google_analytics_async.html" . }}

View file

@ -1,11 +1,11 @@
{{ $bundleRaw := resources.Get "/sass/style.sass" | resources.ExecuteAsTemplate "/css/main.tmp.css" . }}
{{ $bundleRaw := resources.Get "sass/style.sass" | resources.ExecuteAsTemplate "css/main.tmp.css" . }}
{{ if .Site.IsServer }}
{{ $cssOpts := (dict "targetPath" "/css/main.css" "enableSourceMap" true ) }}
{{ $cssOpts := (dict "targetPath" "css/main.css" "enableSourceMap" true ) }}
{{ $bundle := $bundleRaw | toCSS $cssOpts }}
<link rel="stylesheet" href="{{ $bundle.RelPermalink }}" media="screen">
{{ else }}
{{ $cssOpts := (dict "targetPath" "/css/main.css" ) }}
{{ $cssOpts := (dict "targetPath" "css/main.css" ) }}
{{ $postCSSOpts := (dict "use" "autoprefixer" ) }}
{{ $bundle := $bundleRaw | toCSS $cssOpts | postCSS $postCSSOpts | minify | fingerprint }}
<link rel="stylesheet" href="{{ $bundle.RelPermalink }}" integrity="{{ $bundle.Data.Integrity }}" crossorigin="anonymous" media="screen">

View file

@ -1,4 +1,4 @@
{{ $owlCarousel := resources.Get "/vendor/owlCarousel/owl.carousel.min.js" }}
{{ $initOwlCarousel := resources.Get "/js/initOwlCarousel.js" | minify }}
{{ $bundleOwlCarousel := slice $owlCarousel $initOwlCarousel | resources.Concat "/js/bundleOwlCarousel.js" | fingerprint }}
{{ $owlCarousel := resources.Get "vendor/owlCarousel/owl.carousel.min.js" }}
{{ $initOwlCarousel := resources.Get "js/initOwlCarousel.js" | minify }}
{{ $bundleOwlCarousel := slice $owlCarousel $initOwlCarousel | resources.Concat "js/bundleOwlCarousel.js" | fingerprint }}
<script src="{{ $bundleOwlCarousel.Permalink }}" integrity="{{ $bundleOwlCarousel.Data.Integrity }}"></script>