Skip to content

fix: override _includes/head.html — minima 2.5.1 has no custom-head.html hook - #59

Merged
ppgranger merged 1 commit into
mainfrom
fix/pages-head-override
Aug 9, 2026
Merged

fix: override _includes/head.html — minima 2.5.1 has no custom-head.html hook#59
ppgranger merged 1 commit into
mainfrom
fix/pages-head-override

Conversation

@ppgranger

Copy link
Copy Markdown
Owner

What broke (found by live-checking #58 after it deployed)

docs/_includes/custom-head.html (renamed correctly in #58) still never rendered on the live site. Root cause: GitHub Pages builds with minima 2.5.1 (per https://pages.github.com/versions/), and that release's head.html has no {% include custom-head.html %} call at all — that extension point was added in a later minima release than the one Pages actually resolves to. jekyll/minima#472 is a support thread about exactly this gap.

Fix

Override _includes/head.html directly instead of relying on a theme extension hook. A site-level _includes/ file always takes precedence over the theme gem's copy of the same path, so this works regardless of which minima version Pages happens to run — no dependency on an extension point that may or may not exist.

The override mirrors minima 2.5.1's head.html verbatim (meta tags, {% seo %}, stylesheet, feed_meta, conditional Google Analytics) plus the two JSON-LD blocks (SoftwareApplication on home, TechArticle on processor/benchmark/comparison pages).

Also dropped a hardcoded softwareVersion: "2.7.1" I'd put in the JSON-LD — this repo has test_version_consistency.py specifically to prevent hand-maintained version literals from drifting, and this include isn't covered by it, so better to just not add another one.

Verification

  • JSON-LD blocks re-validated as well-formed JSON (Liquid tags substituted)
  • Will re-check the live rendered <head> after this merges and Pages rebuilds — that's what caught both previous bugs, local validation alone missed them

…esn't exist in minima 2.5.1

Verified live after PR #58: the JSON-LD still wasn't rendering even with the
correctly-named custom-head.html. Root cause: GitHub Pages builds with
minima 2.5.1 (https://pages.github.com/versions/), and that release's
head.html has no include hook for a custom-head.html at all — it was added
in a later minima release than the one Pages actually runs (see
jekyll/minima#472, a support thread about the exact same gap).

A site-level _includes file always takes precedence over the theme gem's
copy of the same path, so overriding _includes/head.html outright is
version-proof: it works regardless of which minima release Pages resolves
to, rather than depending on an extension point that may not exist yet.

Content mirrors minima 2.5.1's head.html exactly, plus the two JSON-LD
blocks. Also dropped the hardcoded softwareVersion field from the
SoftwareApplication block — this repo has a dedicated test
(test_version_consistency.py) specifically to prevent hand-maintained
version literals from drifting, and a Jekyll include isn't covered by it.
@ppgranger
ppgranger merged commit 74d357d into main Aug 9, 2026
7 checks passed
@ppgranger
ppgranger deleted the fix/pages-head-override branch August 9, 2026 19:02
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.

1 participant