Add cache-busting fingerprints to JS assets - #3
Merged
Conversation
Co-authored-by: SeiferTim <141478+SeiferTim@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
SeiferTim
August 7, 2026 03:37
View session
SeiferTim
marked this pull request as ready for review
August 7, 2026 03:37
There was a problem hiding this comment.
Pull request overview
This PR adds Hugo Pipes fingerprinting (content-hash cache busting) and Subresource Integrity (SRI) attributes to first-party JavaScript assets so browsers reliably fetch updated JS after deploys, aligning JS behavior with the already-fingerprinted CSS pipeline.
Changes:
- Fingerprint
InfiniteEngine.jsand addintegrity+crossoriginon its<script>tag. - Minify then fingerprint
script.js, addingintegrity+crossorigin. - Fingerprint
bootstrap.bundle.min.jsin production and addintegrity(keeping the existing productioncrossorigin).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| site/layouts/partials/scripts.html | Adds fingerprint after minify for script.js and emits SRI attributes. |
| site/layouts/partials/head/infinite-engine.html | Fingerprints InfiniteEngine.js and adds SRI attributes to prevent stale engine JS caching. |
| site/layouts/partials/head/bootstrap.html | Fingerprints production Bootstrap bundle and adds SRI integrity for the generated asset. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
JS assets (
InfiniteEngine.js,script.js,bootstrap.bundle.min.js) were served without content hashes, causing browsers to serve stale cached versions after deploys — most visibly the Haxe/Lime engine component.Changes
layouts/partials/head/infinite-engine.html— pipeInfiniteEngine.jsthrough Hugo'sfingerprint, addintegrityattributelayouts/partials/scripts.html— pipescript.jsthroughfingerprintafterminify, addintegrityattributelayouts/partials/head/bootstrap.html— pipebootstrap.bundle.min.jsthroughfingerprint, addintegrityattributeCSS was already fingerprinted; this brings JS assets to parity. Each deploy now produces uniquely-named JS URLs, forcing browsers to fetch the latest build.