Repository navigation
feat(cms): one reusable SEO heading pattern for sections - #215
Merged
Merged
Conversation
Every section heading is now a single `heading` group (eyebrow, title, description) built by `sectionHeadingField()` and rendered by `<SectionHeading>`, which outputs an `<hgroup>` with the title as `h2` (or `h1` for the hero). Blocks, the post FAQ/CTA and the blog header all use it, so new sections reuse the pattern instead of re-inventing it. The hero rich text is replaced by the plain heading description, so a hero can no longer contain extra headings. The migration renames the existing columns, so content is kept, and turns hero rich text into plain text. The data cache key now includes the latest migration name, so cached pages in the old shape are not served after a schema change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01U6co4xd2fjA45YxTjXXjc3
…ing-v6okax # Conflicts: # apps/cms/src/app/(payload)/admin/importMap.js
Merge the section heading work from #162 onto current main and recreate its migration (section_heading_group) so it sorts after 20261012_110154_remove_author_required_flag_for_comment. Scopes: apps/cms blocks, fields, components, contentExtraction, scopedCache, database/migrations.
dogfrogfog
requested review from
ChiefCreator and
SearheiParkhamchuk
as code owners
October 28, 2026 13:49
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
🎉 This PR is included in version 1.1.1 🎉 The release is available on npm package (@latest dist-tag) Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 0.18.1 🎉 The release is available on npm package (@latest dist-tag) Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 1.4.0 🎉 The release is available on npm package (@latest dist-tag) Your semantic-release bot 📦🚀 |
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.
Recreates #162 on top of current
main: the old base predated20261012_110154_remove_author_required_flag_for_comment, so the migration is regenerated after it.What
Every section heading is now built the same way, once:
sectionHeadingField(defaults?)returns oneheadinggroup (eyebrow,title,description) with the generated typeSectionHeadingFields.<SectionHeading {...block.heading} />renders<hgroup><p>eyebrow</p><h2>title</h2><p>description</p></hgroup>. Alignment, size and eyebrow tone are props, so the visual variants (left/center, with or without description) stay in code and the content shape stays the same.as="h1"is used only for the hero and the blog index.sectionHeadingText()(search text) andsectionHeadingContent(heading, level)(SEO content) read the group the same way everywhere.Used by Content, FAQ, CTA Band, Carousel, Chart, Cards Grid, Testimonials, Newsletter (which also gains a description) and Hero, plus the post FAQ/CTA, the CTA banner, related posts and the blog header. The old
SectionHeadercomponent, theprepareSectionHeaderPropsadapter andsectionHeaderFieldsare removed.Hero: the rich text is replaced by the plain heading description. The default hero rich text contained an extra
Headingnode, so heroes shipped with a second heading inside them. The unused"hero"rich text preset is removed.Migration
20261028_134213_section_heading_groupRENAME COLUMNs (eyebrow→heading_eyebrow,heading/title→heading_title,description→heading_description), so existing content is kept. This covers page, global-section and preset tables, their versions, and posts.downreverses everything and turns the description back into a one-paragraph rich text.Cache key change
scopedCachenow adds the latest migration name to the cache key. Vercel's data cache outlives deployments and the page cache key doesn't change, so without this, production would keep serving old-shape cached pages (no headings) after the migration until each page is republished. Every future schema change now invalidates the cache automatically.Verified locally
migrate:downthenmigrateround-trips the new migration cleanly.payload migrate:createafterwards reports no schema changes, andgenerate:typesproduces no diff.check-typespasses.h1s are still possible when a page has two heroes; the stacked hero PR fixes that.id.