Commit 21b467de authored by Kaushal Modi's avatar Kaushal Modi

Revert "Remove Resource minification now that --minify is used"

This reverts commit 645fadd4.

Nope.. the Resource minification is needed with --minify too.
parent 645fadd4
......@@ -7,7 +7,7 @@
<link href="{{ $asset | relURL }}" rel="preload" as="style" onload="this.rel='stylesheet'">
<noscript><link rel="stylesheet" href="{{ $asset | relURL }}"></noscript>
{{ else }}
{{ $asset_min_cache_busted := resources.Get $asset | fingerprint }}
{{ $asset_min_cache_busted := resources.Get $asset | minify | fingerprint }}
<link href="{{ $asset_min_cache_busted.RelPermalink }}" rel="preload" as="style" onload="this.rel='stylesheet'">
<noscript><link rel="stylesheet" href="{{ (index . $asset) | relURL }}"></noscript>
{{ end }}
......@@ -20,7 +20,7 @@
{{ if in (string $.Site.BaseURL) "localhost" }}
<link rel="stylesheet" href="{{ $asset | relURL }}">
{{ else }}
{{ $asset_min_cache_busted := resources.Get $asset | fingerprint }}
{{ $asset_min_cache_busted := resources.Get $asset | minify | fingerprint }}
<link rel="stylesheet" href="{{ $asset_min_cache_busted.RelPermalink }}">
{{ end }}
{{ else }}
......
......@@ -47,7 +47,7 @@
<!-- With this, links like this will work!
https://scripter.co/hugo-leaf-and-branch-bundles/##Hugo%20considers%20the%20first%20directory%20level
-->
{{ $fragmention_js := resources.Get "js/libs/fragmentions/wrapper.js" | fingerprint }}
{{ $fragmention_js := resources.Get "js/libs/fragmentions/wrapper.js" | minify | fingerprint }}
<script defer src="{{ $fragmention_js.RelPermalink }}"></script>
{{ partialCached "h-card.html" . }}
......@@ -84,7 +84,7 @@
Do *NOT* lazy load refined.css, as that caused a lot of visual glitch. -->
<!-- Just load the refined.css directly for now until I get time to figure out
which are the critical components in that CSS that I can inline here. -->
{{ $refined_css := resources.Get "css/refined.css" | fingerprint }}
{{ $refined_css := resources.Get "css/refined.css" | minify | fingerprint }}
<link rel="stylesheet" href="{{ $refined_css.RelPermalink }}">
{{ partialCached "asset_custom_css.html" . }}
......@@ -115,11 +115,11 @@
</style>
{{ end }}
{{ $resp_nav_js := resources.Get "js/responsive-nav-orig.js" | fingerprint }}
{{ $resp_nav_js := resources.Get "js/responsive-nav-orig.js" | minify | fingerprint }}
<script src="{{ $resp_nav_js.RelPermalink }}"></script>
<!-- FontAwesome Pro 5.0.11 -->
{{ $fa_js := resources.Get "js/libs/fa/fontawesome-all.js" | fingerprint }}
{{ $fa_js := resources.Get "js/libs/fa/fontawesome-all.js" | minify | fingerprint }}
<script defer src="{{ $fa_js.RelPermalink }}"></script>
{{ with .Params.mathjax }}
......
......@@ -5,7 +5,7 @@
Also move the mathjax config to a separate file from the inline script so
that 'unsafe-inline can also be removed from script-src CSP.
-->
{{ $mathjax_js := resources.Get "js/mathjax-config.js" | fingerprint }}
{{ $mathjax_js := resources.Get "js/mathjax-config.js" | minify | fingerprint }}
<script src="{{ $mathjax_js.RelPermalink }}"></script>
<!-- https://gohugo.io/content-management/formats/#mathjax-with-hugo -->
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.4/MathJax.js?config=TeX-AMS_HTML"></script>
......
{{ $jquery_slim_js := resources.Get "js/libs/jquery/3.3.1/jquery.slim.min.js" | fingerprint }}
{{ $jquery_slim_js := resources.Get "js/libs/jquery/3.3.1/jquery.slim.min.js" | minify | fingerprint }}
<script src="{{ $jquery_slim_js.RelPermalink }}"></script>
<script type="application/javascript">(function() {
var $toc = $('#TableOfContents');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment