assets: add fingerprint, integrity

This commit is contained in:
Aditya Telange 2020-07-20 20:53:08 +05:30
parent 338027b046
commit 41006c33e1
2 changed files with 4 additions and 4 deletions

View File

@ -23,8 +23,8 @@
<footer class="footer">
{{- partial "footer.html" . }}
</footer>
{{ $highlight := resources.Get "highlight.min.js" | minify }}
<script src="{{ $highlight.Permalink }}"></script>
{{ $highlight := resources.Get "highlight.min.js" | minify | fingerprint}}
<script src="{{ $highlight.Permalink }}" integrity="{{ $highlight.Data.Integrity }}"></script>
<script>
hljs.initHighlightingOnLoad();
</script>

View File

@ -14,8 +14,8 @@
<!-- Styles -->
{{ $anoldhope := resources.Get "an-old-hope.min.css" | minify }}
{{ $style := resources.Get "style.css" | minify }}
{{ $stylesheet := slice $anoldhope $style | resources.Concat "stylesheet.css" | minify }}
<link href="{{ $stylesheet.Permalink }}" rel="stylesheet">
{{ $stylesheet := slice $anoldhope $style | resources.Concat "stylesheet.css" | minify | fingerprint }}
<link href="{{ $stylesheet.Permalink }}" integrity="{{ $stylesheet.Data.Integrity }}" rel="stylesheet">
<link href="{{ "custom.css" | absURL }}" rel="stylesheet">
<!-- Favicons -->
<link rel="apple-touch-icon" href="{{ "apple-touch-icon.png" | absURL }}">