Skip to content

Promote develop to main: the vendored theme restored to upstream - #42

Merged
ptr727 merged 2 commits into
mainfrom
develop
Aug 7, 2026
Merged

Promote develop to main: the vendored theme restored to upstream#42
ptr727 merged 2 commits into
mainfrom
develop

Conversation

@ptr727

@ptr727 ptr727 commented Aug 7, 2026

Copy link
Copy Markdown
Owner

Promotes develop (43d167b) to main (2b132e4). Two commits, both merged with a clean review and green CI.

#40 Move the local edits out of the vendored theme, and document its width knobs
#41 Give .gallery-cols-5 the width its own pattern implies

What changed

themes/PaperMod/ is now byte identical to upstream 154d006e across all 125 files. It previously carried site customization in two of its own files, which made an update a diff-and-reapply rather than a directory replace, and put the repo in breach of its own CODESTYLE.md rule to override a theme template rather than edit the theme in place.

Both edits sat in extension points the theme documents for the purpose, and Hugo resolves a project's own trees ahead of the theme's, so both moved without a fork:

Customization Now at
Lexend body font, and the gallery / gallery-cols-* rules assets/css/extended/custom.css
Google Fonts preconnect and stylesheet links layouts/_partials/extend_head.html

themes/README.md records the verification command, so "byte identical to upstream" stays checkable rather than asserted. It also gains a Customization points section documenting the four :root variables that govern layout width, since PaperMod exposes no width parameter to any template and finding that out otherwise costs a read of the theme's CSS.

The two root layouts/ overrides are untouched. They work around Hugo 0.158 deprecations upstream has not tracked, rather than customizing the site.

Verification

The live check was run against the local mirror, which is the half of the URL contract CI cannot reach: the validation workflow proves the 328 URLs that must render, and nothing in a build exercises the 917 redirects.

==> rules from release <id> (after 0s)
==> checking 328 URLs that must render
==> checking 917 URLs that must redirect
PASS - 1245 URLs honored

The release stamp confirmed the rules came from the release just installed rather than stale ones. The tree that passed is 71c4f05d, which is develop's tree exactly, so this result describes what is being promoted rather than an approximation of it.

Also verified across both commits:

Not in this promotion

No publish. publish-release.yml is workflow_dispatch only, so merging here ships nothing, and the TODO.md item holding a release from main until the pipeline has soaked is untouched and still stands.

Switching the theme to a submodule or Hugo Modules was considered and declined; themes/README.md records why for the next reader. A submodule is the only fetch mechanism that would gain a bot, because PaperMod tags releases as v8.0, which is not valid semver, so Hugo Modules could only pin a pseudo-version and Dependabot does not upgrade those. Weighed against what a bot would have found: upstream's only commit in the three months to 2026-08-06 edited its own README. This work is the precondition either way.

One process finding came out of this and is filed at the hub as ProjectTemplate#597: #40 touched layouts/, which is one of the trigger paths for the pre-pull-request local verification in OPERATIONS.md, and that gate was missed before the pull request was opened. It has since been run and passes, as above.

Merge with a plain merge commit. Do not pass --delete-branch, which on a develop -> main promotion deletes develop.

🤖 Generated with Claude Code

ptr727 and others added 2 commits August 6, 2026 18:05
…h knobs (#40)

* Move the two local edits out of the vendored theme

The vendored PaperMod copy carried site customization in two of its files, which
is what made an update a diff-and-reapply rather than a directory replace, and
what put the repo in breach of its own CODESTYLE rule to override a theme
template rather than edit the theme in place.

Both sat in extension points the theme documents for the purpose, so both move
without a fork. Hugo resolves a project's own trees ahead of the theme's:

- The Lexend body rule and the gallery shortcode's layout rules move to
  assets/css/extended/custom.css. PaperMod's head partial globs
  css/extended/*.css across the union of both assets/ trees, so a project file
  is picked up by the same glob that finds the theme's empty placeholder. It is
  named custom.css rather than blank.css so it unions in alongside that
  placeholder instead of shadowing it.
- The Google Fonts preconnect and stylesheet links move to
  layouts/_partials/extend_head.html, which overrides the theme's comment-only
  partial outright.

themes/PaperMod/ is now byte identical to upstream 154d006e across all 125
files, verified by diffing against a clone at that commit. themes/README.md
records the verification command so the claim stays checkable, and records why
a submodule is the only fetch mechanism that would gain a bot here: PaperMod
tags releases as v8.0, which is not valid semver, so Hugo Modules could only
pin a pseudo-version and Dependabot does not upgrade those.

The two root layouts/ overrides are untouched. They work around Hugo 0.158
deprecations upstream has not tracked, rather than customizing the site.

Rendered output is byte identical to the previous build, hashed stylesheet name
included. Verified under hugo --gc --minify --panicOnWarning, with the URL
contract passing at 328/328, 778/778, and 1012/1012, and editorconfig-checker
and markdownlint clean.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* Document the theme's width knobs and where to override them

The question "how do I widen the page" has no answer in hugo.yaml, and finding
that out costs a read of the theme's CSS. PaperMod exposes no width parameter to
any template, so the only levers are four custom properties on :root in
core/theme-vars.css, and nothing in the repo said so.

themes/README.md gains a "Customization points" section recording the four
variables, what consumes each and at what computed width, and two things that
are easy to get wrong:

- The width is a fixed pixel cap with no responsive term. zmedia.css, the
  theme's only media-query file, never touches --main-width or --nav-width, so
  the content column is 720px from a laptop to an ultrawide. The nav is already
  304px wider than the content, so the two have to move together.
- Overrides belong in assets/css/extended/custom.css, which the head partial
  concatenates after the core sheet, so they win on source order with no
  !important. The trap is that media queries add no specificity, so a top-level
  :root there also beats zmedia inside its own breakpoint. That is safe for the
  width variables, which zmedia never sets, and wrong for --gap, which it does.

The section also records why the default stands: 720px at 18px is about 80
characters per line, already at the top of the readable range. Images and
galleries inheriting the same cap is the part that costs something on a wide
display, and the fix for that is media breaking out of the column rather than a
wider column.

TODO.md carries a one-line pointer under Open decisions so the question is
findable from the place someone would look for it. OPERATIONS.md is deploy and
serving, so it is the wrong home.

Docs only. No rendered byte changes; verified under hugo --gc --minify
--panicOnWarning against the same baseline, with markdownlint and
editorconfig-checker clean. The audit report's themes/README.md:12 citation for
hugo.vendored.provenance still lands on the commit row.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* Name the real selector for --nav-width, and record the cols-5 defect

Two findings from the review of #40.

The width table said `--nav-width` is consumed by `.nav`. It is not; the theme
applies it to `.header-nav` in common/header.css, and `.nav` is not a selector
in the theme at all, only `.nav-sep`. A reader following the table would have
searched for a rule that does not exist. Both rows now name the file as well as
the selector, since the point of the table is to be followed.

`.gallery-cols-5 figure` really is wrong: the rule's own pattern is 1/N (100,
50, 33.33, 25, ..., 16.67) and the five-column case repeats the four-column 25%,
so it renders four per row and wraps the fifth. It predates this branch, and one
page uses it. It is recorded under Open decisions rather than fixed here,
because this branch's claim is that the move changed no rendered byte and is
verified by diffing the built site. A render change would retire the only
evidence that the move was safe. It is a one-value fix worth its own change,
where it can be looked at rather than diffed.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
The gallery column rules are 1/N widths: 100%, 50%, 33.3333333333%, 25%,
16.666666666%. The five-column case repeated the four-column 25% rather than
20%, which is the shape of a copied line, not a decision. It arrived with the
original edit to the theme's extended/blank.css slot and moved verbatim in #40,
which claimed to change no rendered byte and so could not correct it.

The rendered effect today is none, and the raised finding overstated it. One
page passes cols="5", and its gallery is empty:

    {{< gallery cols="5" >}}
    {{< /gallery >}}

so it emits <div class="gallery gallery-cols-5"></div> with no figures inside,
and no figure anywhere on the site is laid out by this rule. The five-per-row
claim was not checked against the rendered page before it was repeated. This is
therefore a latent fix: it is what the next cols="5" gallery will need, not a
defect anyone can see now. The empty shortcode is a content artifact from the
WordPress import and is left alone, since content/ is an imported archive that
style sweeps do not reach.

The rule-level diff of the emitted stylesheet is one line, 25% to 20%. Every
built page still differs, because the stylesheet is fingerprinted and each page
carries its hash and integrity attribute; per page that link is the only change.
URL contract passes 328/328, 778/778, 1012/1012. themes/PaperMod/ is still byte
identical to upstream 154d006e.

TODO.md loses the Open decisions entry that recorded this, since it is done.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings August 7, 2026 01:24

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR promotes develop to main, restoring the vendored PaperMod theme directory to be byte-identical with upstream and relocating prior theme customizations into Hugo’s intended project-level extension points (assets/ and layouts/).

Changes:

  • Removed in-theme custom CSS and head overrides from themes/PaperMod/ and reintroduced them as project overrides (assets/css/extended/custom.css, layouts/_partials/extend_head.html).
  • Expanded themes/README.md to document the upstream commit provenance, provide a reproducible verification command, and document PaperMod’s width-related CSS variables and override pitfalls.
  • Updated TODO.md to track the remaining open decision around the fixed 720px content cap and point to the new documentation.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
TODO.md Adds an open-decision note about fixed content width and references the new “Customization points” documentation.
themes/README.md Documents upstream commit provenance, verification steps, and PaperMod width customization variables and override guidance.
themes/PaperMod/layouts/_partials/extend_head.html Removes previously vendored Lexend font link tags to restore upstream equivalence.
themes/PaperMod/assets/css/extended/blank.css Removes previously vendored custom body/gallery CSS rules to restore upstream equivalence.
layouts/_partials/extend_head.html Adds the project-level extend_head.html override to load Lexend via Google Fonts without modifying the theme.
assets/css/extended/custom.css Adds project-level custom CSS (Lexend body font selection + gallery layout rules), picked up by the theme’s extended CSS bundling.

@ptr727
ptr727 merged commit 876690a into main Aug 7, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants