Skip to content

Commit

Permalink
feat: js build with minify and fingerprint
Browse files Browse the repository at this point in the history
  • Loading branch information
tomowang committed Dec 2, 2023
1 parent 9d7949c commit ebe7308
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion layouts/_default/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@
<footer class="flex flex-none justify-center">
{{ partial "footer.html" . }}
</footer>
{{ $built := resources.Get "js/main.js" | js.Build "main.js" }}
{{- $built := resources.Get "js/main.js" | js.Build "main.js" -}}
{{- if not .Site.IsServer }}
{{- $built = $built | minify | fingerprint -}}
{{ end -}}
<script src="{{ $built.RelPermalink }}"></script>
{{ partial "extended_footer.html" . }}
</body>
Expand Down

0 comments on commit ebe7308

Please sign in to comment.