Repository navigation
feat(cms): dedicated page hero field — one H1, sections are H2 - #163
Closed
dogfrogfog wants to merge 2 commits into
Closed
dogfrogfog wants to merge 2 commits into
dogfrogfog wants to merge 2 commits into
Conversation
Pages now have a `hero` blocks field (exactly one block) above the sections, and the hero is no longer available in the sections array or in global sections. The hero always renders the page's only H1 at the top; every section title renders as H2, so the heading structure is correct by construction. Hero blocks live in `heroBlocks`, so new hero variants can be added without touching the sections. The migration moves each page's first hero (per locale and version) into the new field and removes extra heroes, which the new structure can no longer hold. Heroes inside global sections are dropped for the same reason. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01U6co4xd2fjA45YxTjXXjc3
dogfrogfog
requested review from
ChiefCreator and
SearheiParkhamchuk
as code owners
October 2, 2026 09:29
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…hawking-v6okax-hero
Member
Author
|
Superseded by #216 (recreated on current main with a regenerated migration). Merged. |
This branch was successfully deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Stacked on the heading-pattern PR (base:
claude/practical-hawking-v6okax). Merge that one first.What
herofield: a blocks field above the sections, required, exactly one row (minRows: 1,maxRows: 1), localized like the sections. Its block types come fromblocks/heroBlocks.ts, so new hero variants are added there without touching the sections.contentBlocks, so it can't be added to the sections array or to global sections. The sections field is now labelled "Sections", and both fields tell editors which heading level they produce.RenderHerorenders the single visible hero beforeRenderBlocks. Result: oneh1at the top of the page andh2for every section title, enforced by the structure rather than by editors.Migration
20261002_092121_dedicated_page_heroPayload keeps every block slug in one table per collection, told apart by
_path. So moving heroes needs no table changes:page_blocks_hero/_page_v_blocks_hero, the first hero per page, locale and version moves fromblockstohero.gsec_*_herotables). A global section can sit anywhere in the sections, so letting it hold a hero would allow a secondh1again.downmoves heroes back to the top ofblocks. Deleted heroes are not restored.Verified locally
enand one ines: after migration it has one hero per locale in the new field and renders exactly oneh1at the top. Down/up round trip is clean, and there are no orphaned hero action rows.payload migrate:createafterwards reports no schema changes.check-types,lintandtest:int(54/54) pass.🤖 Generated with Claude Code
https://claude.ai/code/session_01U6co4xd2fjA45YxTjXXjc3
Generated by Claude Code