Jelajahi Sumber

refactor: Bootstrap JS URI

Rename URI as GitHub Pages doesn't automatically publish folders with underscores.

Netlify was unaffected.

See https://github.com/wowchemy/wowchemy-hugo-modules/discussions/2201#discussioncomment-508553
George Cushen 4 tahun lalu
induk
melakukan
17505c4581
1 mengubah file dengan 2 tambahan dan 1 penghapusan
  1. 2 1
      wowchemy/layouts/partials/site_js.html

+ 2 - 1
wowchemy/layouts/partials/site_js.html

@@ -102,7 +102,8 @@
       <script id="dsq-count-scr" src="https://{{site.Params.comments.disqus.shortname}}.disqus.com/count.js" async></script>
     {{end}}
 
-    {{ $js_bootstrap := resources.Get "js/_vendor/bootstrap.bundle.min.js" }}
+    {{/* Rename as GitHub Pages doesn't automatically publish folders with underscores. */}}
+    {{ $js_bootstrap := slice (resources.Get "js/_vendor/bootstrap.bundle.min.js") | resources.Concat "js/bootstrap.bundle.min.js" }}
     {{- if hugo.IsProduction -}}
       {{ $js_bootstrap = $js_bootstrap | fingerprint "md5" }}{{/* Note: no `minify` as using pre-minified JS. */}}
     {{- end -}}