Repository navigation
Conversation
e0a6d85 to
01a3feb
Compare
01a3feb to
e20b44d
Compare
|
Does anyone have time to review this PR stack? They are blockers for moving forward with the Hugo upgrade. |
|
This second PR doesn't seem ready. #694 is more ready to merge than this one. From PR #694: And from PR #695: Details
PR 695 stacks on 694, adding a real base template, converting page templates to it, and fixing sidebar-menu The 0.113 failure is my own mistake: Many pages differ for a refactor that should be output-neutral. I'll aggregate the changed lines to see what actually changed. Besides the new The sidebar changes are all on the contribute pages (one page has about 200 sponsor items), and the roadmap page needs a closer look. I'll examine the roadmap and sponsors pages directly. Both 694 and main leave a stray I noticed the sponsors page sidebar in 695 nests progressively deeper with a list-style staircase, unlike 694's flat rendering—likely a regression. I'll check the new templates and the full rendered sidebar to confirm. I traced the staircase markup to the I noticed a mismatch: the sponsors page shows
The 694 Found that On 695 the sidebar box has height 0 and the I've confirmed the contribute sidebar regression in 695 (works on 694, shows empty grey box on 695). Next I'll check the 0.144.2 diff, test whether the Two details remain: The I'll spend a bit of time building against current Hugo 0.167, since that commit targets it, using scratch copies with the two content-level blockers worked around so main's pre-existing failures don't mask the template results. An empty Both branches build on Hugo 0.167 with those workarounds and print the same deprecation warnings. I'll diff 695 against 694 there and check whether the sidebar problem persists. The sponsors regression shows up identically on Hugo 0.167. I'll stop the local servers and send both screenshots. Verification: #695 (stacked on #694): real base template and templates converted to itVerdict: FAIL for 695. 694 still stands as a PASS. Claim: 695 introduces a real Method: I built 695 with Hugo 0.113.0 (production's version), 0.144.2 and 0.167.0, and diffed the generated HTML against the 694 build. For 0.167 I used scratch copies with two content-level workarounds, because both branches otherwise fail there for reasons unrelated to either PR ( Steps
Root cause of the sponsors regression
695 splits that code into Findings
Are both together correct? 694 is correct on its own. Stacked, they are not correct as-is: 695 breaks the sidebar on |
The contribute layout now uses the shared Details
Fix. a6c0853 points Checks, all on Hugo 0.113:
The same 36 pages on Hugo 0.167 are covered in my comment on #694. The problems there come from the version bump, not this PR. |
a6c0853 to
6517348
Compare
baseof.html now owns the document scaffolding (doctype, head, body, header block, main landmark, footer, scripts) through new head/*, page-header, site-footer, and scripts partials. Pages define header and main blocks. single.html's colliding define menu / define pagination become the sidebar-menu and prev-next partials. Output change is limited to the new <main id=content> landmark.
Mechanical conversion of 34 templates: the repeated header stanza becomes page-header options (or a header block override for the pages whose banner sits outside the header), bodies wrap in define main, and head.html is deleted. download and contribute sidebars move to their own partials, ending the parse-order collision between three global define menu templates. Side effects, all verified in the output diff: contribute-layout pages render their own sidebar variant again, roadmap's stray closing tags after the footer are gone, and theme's unclosed fixed-top div is closed.
The tree item rendered inside unclosed 'with .File' blocks, so .IsAncestor executed against the File object; old Hugo shimmed that, current Hugo errors. Close the scopes and compare RelPermalink. 0.113 output is unchanged.
The contribute layout's own menu markup never rendered on main: three templates defined a global "menu" and the download one won. Moving it into a partial made it run, and its unbalanced <ul>/<li> wrappers collapsed the /contribute/sponsors/ sidebar. Render the shared sidebar-menu.html instead, which matches production, and drop the stray </li></ul> after </nav>.
6517348 to
bab22ad
Compare


Converts the theme to a real base template.
baseof.htmlnow owns the document scaffolding (doctype, head, body, header block,<main>landmark, footer, scripts); all 38 page templates becomedefine "header"/define "main"blocks,head.htmlis split intohead/{meta,assets,favicons,analytics}partials, and the three colliding globaldefine "menu"templates become sidebar partials (sidebar-menu.html, shared by the default and contribute layouts, andsidebar-menu-download.html).Verified on Hugo 0.113 (compose production build): every page changes only by the new
<main id="content">landmark, apart from deliberate fixes visible in the diff: roadmap's stray closing tags after the footer, theme's unclosedfixed-topdiv, and the stray</li></ul>after the sponsors sidebar. On main the download template won themenucollision, so the contribute layout's own menu code never ran. That code was broken, so the contribute layout now uses the shared partial, which renders the same sidebar production does. Awith .Filescoping bug that hard-errors on current Hugo is fixed (RelPermalinkcomparisons). Hugo 0.167 builds the converted site once the remaining upgrade changes listed on #694 are applied.Stacked on #694 (stack #696); reviewers see only this layer's commits.