Repository navigation
Conversation
0adb6e6 to
96458b7
Compare
|
@echoix GitHub stacks reject fork PRs, and gh-stack v0.1.0 always resolves a fork clone to its parent repo. To test the stacked PRs I made the base PR a branch of OSGeo/grass-website |
96458b7 to
23a4db6
Compare
|
This seems mostly correct, but not enough to bump to the latest hugo version.
Details
I'll start by reading the PR and checking the repo state. The PR is on a repo outside this session's scope. I'll try the local clone first, since the PR head may be fetchable from the remote. The PR is on OSGeo/grass-website, which you named explicitly, and Git reads of the public repo work, so I'll fetch the PR head into the existing local clone. This is a Hugo site, so the surface is the built HTML and RSS output. I'll build both main and the PR head and diff the results. First I'll check the tooling and how CI builds. Production builds with Hugo extended 0.113.0, so I'll build with that and also with a recent Hugo, since the PR is about removing deprecated APIs. I'll check whether I can download the binaries. Hugo 0.113.0 downloaded. Next I'll get a recent Hugo for the deprecation check, and set up two worktrees (main and PR head) with the dependencies installed. The "latest" redirect didn't resolve, so I'll look up a concrete version. Both worktrees have their dependencies. I'll build each with production's Hugo 0.113.0, using the production command Both build on the production version with the same counts. I'll diff the generated output next. Nearly every page differs, probably from fingerprinted asset names in the shared head. I'll look at one representative diff to see. Both the double-slash URL fix and the photoswipe script fingerprinting match the PR's claims. Now I'll gather every distinct changed line across the site to check for anything unexpected. Most changes are the expected URL-form switches. I'll look at the rest of the list for anything else, especially the RSS feeds and the "March 28, 2019" and Two items need a closer look: the RSS I confirmed the RSS webMaster difference is just whitespace, and the news index no longer misclassifies itself as a 2019 item per the PR. Now I'll compare all XML files with inter-tag whitespace stripped to verify the feeds are otherwise unchanged. The normalized XML still differs in 14 files, so whitespace alone doesn't explain it. I'll find the actual difference, and also check the double-slash URL remaining in the gallery page. The feeds differ only by trailing whitespace. The gallery page still has The remaining BaseURL slashes are fine and the gallery double-slash issue predates this PR, so I'll leave those alone. Next, I'll build both versions with Hugo 0.167.0 to compare deprecation warnings and errors. Hugo 0.167 fails on both branches due to unrelated content issues, so I'll switch to 0.144.2 for a fair template-deprecation comparison. Neither build printed warnings, but Hugo logs some deprecations at info level. I'll re-run with No deprecation messages show up at either Hugo version, so that's not a useful signal. I'll instead compare PR vs main output on both 0.144.2 and 0.113.0 to see if the base RSS already lost content on the newer Hugo. The doubled The PR behaves the same on 0.144.2, fixing the double slash and dropping the self-listing. I'll verify that the remaining "March 28, 2019" entry is a real news item and not the section listing itself. The news listing dropped from 173 to 172 items, with only the "Latest news" self-entry removed. Next I'll check how the page loads the lightbox to verify it still works in a real browser after removing Babel. I'll build with a localhost baseURL to work around the absolute production URLs, then serve both versions and test in Chromium to confirm the module loads and the lightbox opens. I'm at the browser check: both builds are served locally, and next I'm finding how the gallery page triggers the lightbox so I can drive it. The site uses the legacy PhotoSwipe v4 plugin, not the ESM lightbox, so I can only verify the fingerprinted module loads rather than test its behavior. I'll now load several pages on both builds in Chromium and check for console errors, failed requests, SRI issues, and gallery lightbox clicks. The module loads fine in both builds and the footer logo path is correct, but the gallery click failed on a hidden anchor, with 404s appearing in both builds. I'll fix the script to target a visible link and list out the 404 URLs. The gallery's legacy Everything checks out. I'll send the footer screenshot so the evidence reaches you, then write up the report. Verification: #694 — replace deprecated Hugo template APIs, drop Babel, prune configVerdict: PASS Claim: The PR makes no intended change to the site's content. It replaces deprecated template APIs with forms that work on both Hugo 0.113 and newer. It removes Babel from the photoswipe pipeline (the module is now minified and fingerprinted). It fixes double-slash Method: The repo has no Steps
Screenshot / sample: footer of Findings
|
This PR only replaces the deprecated template APIs. The remaining changes only work on the newer Hugo, so they will go in the version bump on #638 after this stack merges. Details
New commit 08bb383. Bootstrap, the photoswipe module, the site bundle, OpenLayers, and the community map script now use Hugo 0.167 trial. I applied the remaining upgrade changes to a scratch copy of #695 and built it with the official
Screenshots of the trial compared with #695 on 0.113 turned up three problems the bump has to fix:
Two notes for the bump itself. hugomods stopped publishing images after 0.165.0, so the compose files should move to the official image, which includes Dart Sass. The Dart Sass Other points from your report. The removed |
08bb383 to
2e46aa7
Compare
The lightbox module was transpiled for old browsers, then loaded with type=module, which those browsers ignore. Serve the ES module minified and fingerprinted; drop the @babel devDependencies.
Drop exec allowances for tools the build never invokes (dart-sass-embedded, postcss, babel, npx) and allow sass ahead of the Dart Sass switch. Remove the misplaced enableInlineShortcodes key under [security] and two mounts whose sources do not exist (bootstrap-icons is not a dependency; there is no root assets directory).
- .Data.Pages to .Pages; unguarded .File.UniqueID comparisons to .RelPermalink; File.Dir where-clause tightened to direct children - .Site.Author and .Site.Config.Services.RSS (removed upstream) dropped from rss.xml along with its unused page-collection prologue - where .Site.Pages to site.RegularPages for news listings; the news section page no longer lists itself as a 2019 item - global toCSS/minify/fingerprint aliases to their resources.* forms - Site.BaseURL string concatenation emitted double-slash URLs; use relURL. zenodo-card partial now receives its context.
Subresource integrity on an absolute URL fails when the page is served from another origin, such as a mirror. Root-relative URLs keep every script same-origin.
2e46aa7 to
4d20eb0
Compare

Removes every template construct that errors on current Hugo, so #638 gets closer to a version-pin flip. Three commits:
type="module", which those browsers ignore. The module is now served minified and fingerprinted;@babel/*devDependencies dropped.security.exec.allowreduced to['^go$', '^sass$'](nothing invokes dart-sass-embedded, postcss, babel, or npx;^sass$pre-arms the Dart Sass switch). Removes the misplacedenableInlineShortcodesunder[security]and two mounts with nonexistent sources..Data.Pages, unguarded.File.UniqueID,.Site.Author,.Site.Config.Services.RSS, and the globalminify/fingerprintaliases replaced with forms valid on both 0.113 and current Hugo (toCSSstays:resources.ToCSSis removed upstream,css.Sassdoes not exist on 0.113).Site.BaseURLstring concatenation emitted//URLs on every page; nowrelURL. News listings usesite.RegularPages, which also stops the news section page listing itself as a 2019 item.Verified on Hugo 0.113 (production compose build; output diff limited to the intended URL fixes) and on Hugo 0.164 extended, which now builds with zero errors. Remaining 0.164 items are upgrade-time only:
_buildfront matter rename in six download pages,allowContentfor the four 1996 HTML news files,languageCode/languageName/.Site.Datarenames (their replacements do not exist on 0.113), and the sitemap output format.Part of the cleanup stack preparing #638.
Resubmitted from #689 as a same-repo branch so it can be part of stack #696 (stacked PRs do not accept fork PRs).