-
Notifications
You must be signed in to change notification settings - Fork 0
Declare the generator pin once and record what the theme is a copy of #30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| name: Install Hugo | ||
| description: Install the pinned Hugo extended build, verified by checksum before install. | ||
|
|
||
| # The single declaration of which generator this repo builds with. | ||
| # It used to live in both validate-task.yml and deploy-site-task.yml, with an instruction to update both and nothing enforcing it. | ||
| # A one-sided bump was silent and produced exactly the failure the pin exists to prevent: validation building the site with one generator while the deploy shipped a tree built by another, each verifying its own checksum against its own version and both passing. | ||
| # No Dependabot ecosystem tracks Hugo, so both values move by hand and there was no bot to catch the skew either. | ||
| # | ||
| # Pinned by version and by checksum rather than installed from a floating action, because the site is reproducible only if the generator is, and a minor bump can change rendered output. | ||
| # Update both values together, from the checksums file on the Hugo release. | ||
|
|
||
| # The pin is hardcoded below rather than exposed as inputs with defaults. | ||
| # An overridable input would let two callers pass different values and reintroduce the divergence this action exists to remove, which is the same defect one level up. | ||
| # A pin that callers cannot override is correct by construction rather than by everyone agreeing to omit the argument. | ||
| # Change it here, in one place, and every caller moves together or none does. | ||
|
|
||
| runs: | ||
| using: composite | ||
| steps: | ||
|
|
||
| # A tampered or moved artifact fails at the checksum rather than producing a wrong site. | ||
| # The extended build is asserted from the binary rather than inferred from the file name, since the name is the only thing that carried that requirement before. | ||
| - name: Install Hugo step | ||
| shell: bash | ||
| env: | ||
| HUGO_VERSION: 0.164.0 | ||
| HUGO_SHA256: 8325f3653032d0fc536503691f4833dc4eb6c6be02ee62466758f3f37a7f2fcd | ||
| run: | | ||
| set -Eeuo pipefail | ||
| deb="hugo_extended_${HUGO_VERSION}_linux-amd64.deb" | ||
| curl -sSLf -o "$deb" \ | ||
| "https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/${deb}" | ||
| echo "${HUGO_SHA256} ${deb}" | sha256sum --check --strict | ||
| sudo dpkg --install "$deb" | ||
| hugo version | ||
| hugo version | grep -q extended || { | ||
| echo "::error::Hugo reports a non-extended build, which cannot process this site's SCSS." | ||
| exit 1 | ||
| } |
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| # Vendored themes | ||
|
|
||
| This directory holds third-party theme source, copied in rather than fetched by a manager. It sits outside `PaperMod/` deliberately, so replacing that directory wholesale on an update does not take this record with it. | ||
|
|
||
| Vendoring is the decision; not recording what was vendored was the gap. Without an upstream ref there is no way to ask what changed upstream, whether a fix landed, or whether a local edit is still needed, and a 125-file copy is a large surface to carry blind. | ||
|
|
||
| ## PaperMod | ||
|
|
||
| | | | | ||
| | --- | --- | | ||
| | Upstream | <https://github.com/adityatelange/hugo-PaperMod> | | ||
| | Commit | `154d006e0182dfc7da38008323976b02e6bfab4a` | | ||
| | Committed upstream | 2026-05-10 | | ||
| | Describes as | `v8.0-138-g154d006` | | ||
| | License | MIT, retained at `PaperMod/LICENSE` | | ||
|
|
||
| The commit was recovered by matching all 125 tracked blobs against upstream history rather than by reading a version marker, since the copy carries none. Every file matches that commit exactly except the two below, so the identification is not approximate. | ||
|
|
||
| ### Local edits | ||
|
|
||
| Both sit in extension points the theme documents for this purpose, so neither is a fork of theme logic. | ||
|
|
||
| | File | Edit | | ||
| | --- | --- | | ||
| | `PaperMod/assets/css/extended/blank.css` | The theme's custom-CSS slot, which ships empty. Carries the Lexend body font and the `gallery` and `gallery-cols-*` rules the gallery shortcode needs. | | ||
| | `PaperMod/layouts/_partials/extend_head.html` | The theme's head-extension partial, which ships empty. Carries the Google Fonts preconnect and stylesheet links for Lexend. | | ||
|
|
||
| Both could live outside the vendored tree instead: Hugo resolves a project's own `assets/css/extended/` and `layouts/_partials/` ahead of the theme's, so moving them would make an update a clean directory replace with nothing to reapply. Worth doing at the next update rather than as a change of its own. | ||
|
|
||
| Separately, `layouts/` at the repository root already overrides two theme templates, for the reason recorded in [`TODO.md`](../TODO.md): PaperMod uses APIs Hugo deprecated in 0.158, and `--panicOnWarning` would otherwise fail on the theme rather than on content. Whether those overrides are still needed is answerable by diffing against the commit above, which is what this record exists for. | ||
|
|
||
| ## Updating | ||
|
|
||
| Compare against the recorded commit first, so the local edits above are known before anything moves. Replace `PaperMod/` with the new upstream tree, reapply the two edits (or move them out, per the note above), update the table here, and confirm the site still builds under `--panicOnWarning`, which is the gate the theme has failed before. | ||
|
|
||
| No bot watches this. `.github/dependabot.yml` covers GitHub Actions only, since a vendored copy has no manifest to track, so an update is a deliberate act. |
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.
Uh oh!
There was an error while loading. Please reload this page.