Block library: item headings follow the section; the leading block's first image is the LCP image
Found by ipal-doctor live-seo on the reference archive pages (entry list under a
page header without a picture): cards jumped h1 → h3, and the first card image
was lazy.
- itemHeadingLevel: items one below the section heading (h3 under h2, h2 under the
page h1, h2 when the block shows no heading); createBlockRegistry({ itemHeadings })
fixes a level per block. featureGrid, entryList, pricing, steps, team.
- blockPosition / blockHasImage (root): createPageRoute and the 404 view pass
firstImage next to isFirst; leadsWithImage marks the first image of the leading
block eager + fetchPriority high (hero, textMedia, featureGrid, gallery, team,
entryList); priorityImage: false turns it off.
- reference/ipal-doctor.json: the two live-seo silences removed; reference skills
and docs/agent/reference-site/INDEX.md refreshed.
- bin/ipal-blocks.mjs executable like the other bins.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
dd11bc8146
commit
6f56ef4205
@@ -104,6 +104,7 @@ Admin panel components from `@intecion/ipal-kit/admin` — the project does NOT
|
||||
| Export | Import from | What it does / when |
|
||||
|---|---|---|
|
||||
| `RenderBlocks` | `@intecion/ipal-kit/rsc` | Server block renderer: `{ blocks, components, enhanceProps? }` — each block through a `blockType → component` map, skips unknown ones, no extra markup. Do not write your own loop over blocks. Nested blocks render their own `RenderBlocks` (do not pass the map as a prop). |
|
||||
| `blockPosition({ allBlocks, index })`, `blockHasImage(data)` | `@intecion/ipal-kit` | `{ isFirst, firstImage }` for a block — first section (page `h1`) and "no earlier block shows an image" (LCP image); createPageRoute passes both, spread it in your own `enhanceProps`. |
|
||||
| `buildSectionHeaderField(opts?)` | `@intecion/ipal-kit` | `header` field group (eyebrow, heading, intro — localized) for every section block; `interfaceName` `SectionHeaderData`. Options: `name`, `fields`, `interfaceName`. |
|
||||
| `buildSectionSettingsField(opts?)` | `@intecion/ipal-kit` | `settings` group in the block sidebar: `anchor` (#id) + `background` (select, default Default/Muted/Inverted) + your own fields; instead of a per-block `bgColor`/`sectionId`. |
|
||||
|
||||
@@ -125,18 +126,19 @@ Fifteen ready blocks and ten page templates. **Use a library block (or a variant
|
||||
| `blockThumbnail(slug)` | `@intecion/ipal-kit/blocks` | Inline SVG sketch (data URL) for the block picker — what `thumbnail: true` uses. |
|
||||
| `faqItemsFromLayout(doc, { field?, slugs? })` | `@intecion/ipal-kit/blocks` | FAQ questions of the page's FAQ blocks → `getPageJsonLd(locale, slug, { faq: faqItemsFromLayout })` (FAQPage). |
|
||||
| `blockLibraryManifest`, `buildBlockLibraryManifest()`, `fieldPaths(fields)` | `@intecion/ipal-kit/blocks` | Plain data: every block's slug, interface name, variants, stored field paths; primitives, field builders, templates — for `ipal-doctor` and tests. |
|
||||
| `createBlockRegistry(content, options?)` | `@intecion/ipal-kit/blocks/rsc` | `blockType → component` map for `createPageRoute` / `RenderBlocks`, bound to lib/content. Options: `Image`, `Link` (next/image, next/link), `sendForm`, `formClassNames`, `contactDetails`, `classNames` (per block part), `ui` (swap primitives), `components` (swap a block), `backgrounds`, `slugs`, `only`, `extra` (own blocks), `noSnippet` (e.g. `['cta']`), `icons`, `texts`, `lightbox`, `richText`, `entryCard`, `mapTestimonial`. |
|
||||
| `createBlockRegistry(content, options?)` | `@intecion/ipal-kit/blocks/rsc` | `blockType → component` map for `createPageRoute` / `RenderBlocks`, bound to lib/content. Options: `Image`, `Link` (next/image, next/link), `sendForm`, `formClassNames`, `contactDetails`, `classNames` (per block part), `ui` (swap primitives), `components` (swap a block), `backgrounds`, `slugs`, `only`, `extra` (own blocks), `noSnippet` (e.g. `['cta']`), `itemHeadings`, `priorityImage`, `icons`, `texts`, `lightbox`, `richText`, `entryCard`, `mapTestimonial`. |
|
||||
| `LIBRARY_BLOCK_COMPONENTS` | `@intecion/ipal-kit/blocks/rsc` | The plugin's component per slug. |
|
||||
| `HeroBlock`, `TextMediaBlock`, `FeatureGridBlock`, `GalleryBlock`, `FaqBlock`, `CtaBlock`, `ContactBlock`, `TeamBlock`, `PricingBlock`, `LogosBlock`, `TestimonialsBlock`, `StatsBlock`, `RichTextBlock`, `StepsBlock`, `EntryListBlock` | `@intecion/ipal-kit/blocks/rsc` | The block components (server; props `LibraryBlockProps`: data + `locale`, `isFirst`, `ui`, `ctx`, `classNames`). |
|
||||
| `HERO_PARTS`, `TEXT_MEDIA_PARTS`, `FEATURE_GRID_PARTS`, `GALLERY_PARTS`, `FAQ_PARTS`, `CTA_PARTS`, `CONTACT_PARTS`, `TEAM_PARTS`, `PRICING_PARTS`, `LOGOS_PARTS`, `TESTIMONIALS_PARTS`, `STATS_PARTS`, `RICH_TEXT_PARTS`, `STEPS_PARTS`, `ENTRY_LIST_PARTS` | `@intecion/ipal-kit/blocks/rsc` | Default token classes per block part — the keys of `classNames`. |
|
||||
| `defaultEntryCard(doc)`, `defaultTestimonial(doc)` | `@intecion/ipal-kit/blocks/rsc` | Default mapping of a collection document to an entry card / a testimonial (`entryCard`, `mapTestimonial` replace them). |
|
||||
| `Section`, `SECTION_BACKGROUNDS`, `SectionHeader`, `Media`, `CMSLink`, `Anchor`, `buttonClass`, `BUTTON_CLASSES`, `Container`, `CONTAINER_WIDTHS`, `Card`, `CARD_CLASS`, `CARD_INTERACTIVE_CLASS` | `@intecion/ipal-kit/blocks/rsc` | UI primitives, token utilities only: section (anchor, background, `data-surface`), heading group, image/video, panel link, link element, button looks, page column, card. |
|
||||
| `itemHeadingLevel(slug, props)`, `leadsWithImage(props)` | `@intecion/ipal-kit/blocks/rsc` | Item heading tag (one below the section heading; `h2` without one; `itemHeadings` overrides) and whether the block's first image is the page's LCP image (`isFirst` / `firstImage`; `priorityImage: false` turns it off). |
|
||||
| `Buttons`, `headingId(block)`, `TitleLink`, `GRID_COLUMNS`, `cx`, `parts(defaults, overrides)` | `@intecion/ipal-kit/blocks/rsc` | Helpers for own blocks: button row, heading id for `aria-labelledby`, card title link (plain text when the link is dead), grid columns, class joining, part classes. |
|
||||
| `BLOCK_TEXTS`, `blockTexts(locale, own?)`, `fillText(text, value)` | `@intecion/ipal-kit/blocks/rsc` | Visitor texts the blocks write (rating, step) in en/pl; override with `texts`. |
|
||||
| `pageTemplates` | `@intecion/ipal-kit/templates` | `home`, `about`, `services`, `service`, `contact`, `blogIndex`, `post`, `legal(role)`, `cookiePolicy`, `notFound` → `{ title, slug, layout }` for `seed.upsertBySlug('pages', …)`. Options: `blocks`, `overrides`, `layout`, `slug`, `title`, `defaultLocale`, `linkTo`; `contact`/`service` take `form` (`{ $form: 'title' }`). After launch: only with `SEED_ONLY`. |
|
||||
| `systemPageRefs(roles)` | `@intecion/ipal-kit/templates` | `{ homepage: 'start' }` → `{ homepage: { $page: 'start' } }` for `seed.fillGlobal('site-settings', …)`. |
|
||||
|
||||
**Types:** `BlockOptions`, `BlockBuilder`, `BlockLocalization`, `LibraryBlockSetting`, `LibraryBlocksShared`, `LibraryBlockSlug`, `LibraryBlocksOptions`, `VariantOption`, `LibraryBlockDefinition`, `ContactOptions`, `EntryListOptions`, `FeatureGridOptions`, `TestimonialsOptions`, `ItemsFieldOptions`, `MediaFieldOptions`, `VariantFieldOptions`, `IconFieldOptions`, `Columns`, `BlockLibraryManifest`, `ManifestBlock`, `ManifestField` (`/blocks`); `BlockRegistryOptions`, `BlockContent`, `BlockContext`, `BlockUi`, `LibraryBlockProps`, `ContactDetail`, `EntryCard`, `TestimonialItem`, `BlockTexts`, `PartClasses`, `BaseBlockData`, `LinkData`, `LinksData`, `MediaValue`, `RichTextData`, `SectionHeaderData`, `SectionSettingsData`, `HeroBlockData`, `TextMediaBlockData`, `FeatureGridBlockData`, `FeatureItem`, `GalleryBlockData`, `GalleryItem`, `FaqBlockData`, `FaqItem`, `CtaBlockData`, `ContactBlockData`, `TeamBlockData`, `TeamMember`, `PricingBlockData`, `PricingPlan`, `LogosBlockData`, `LogoItem`, `TestimonialsBlockData`, `StatsBlockData`, `StatItem`, `RichTextBlockData`, `StepsBlockData`, `StepItem`, `EntryListBlockData`, `CMSLinkProps`, `ResolveLink`, `LinkComponent`, `ImageComponent`, `MediaProps`, `SectionProps`, `SectionHeaderProps`, `HeadingLevel`, `CardProps`, `ContainerProps`, `ContainerWidth` (`/blocks/rsc`); `TemplateOptions`, `TemplatePage`, `TemplateBlock`, `TemplateValue` (`/templates`).
|
||||
**Types:** `BlockOptions`, `BlockBuilder`, `BlockLocalization`, `LibraryBlockSetting`, `LibraryBlocksShared`, `LibraryBlockSlug`, `LibraryBlocksOptions`, `VariantOption`, `LibraryBlockDefinition`, `ContactOptions`, `EntryListOptions`, `FeatureGridOptions`, `TestimonialsOptions`, `ItemsFieldOptions`, `MediaFieldOptions`, `VariantFieldOptions`, `IconFieldOptions`, `Columns`, `BlockLibraryManifest`, `ManifestBlock`, `ManifestField` (`/blocks`); `BlockRegistryOptions`, `BlockContent`, `BlockContext`, `BlockUi`, `LibraryBlockProps`, `ContactDetail`, `EntryCard`, `TestimonialItem`, `BlockTexts`, `PartClasses`, `BaseBlockData`, `LinkData`, `LinksData`, `MediaValue`, `RichTextData`, `SectionHeaderData`, `SectionSettingsData`, `HeroBlockData`, `TextMediaBlockData`, `FeatureGridBlockData`, `FeatureItem`, `GalleryBlockData`, `GalleryItem`, `FaqBlockData`, `FaqItem`, `CtaBlockData`, `ContactBlockData`, `TeamBlockData`, `TeamMember`, `PricingBlockData`, `PricingPlan`, `LogosBlockData`, `LogoItem`, `TestimonialsBlockData`, `StatsBlockData`, `StatItem`, `RichTextBlockData`, `StepsBlockData`, `StepItem`, `EntryListBlockData`, `CMSLinkProps`, `ResolveLink`, `LinkComponent`, `ImageComponent`, `ItemHeadingLevel`, `MediaProps`, `SectionProps`, `SectionHeaderProps`, `HeadingLevel`, `CardProps`, `ContainerProps`, `ContainerWidth` (`/blocks/rsc`); `TemplateOptions`, `TemplatePage`, `TemplateBlock`, `TemplateValue` (`/templates`).
|
||||
|
||||
## Cookie consent (`consent`) — details: `node_modules/@intecion/ipal-kit/docs/consent.md`
|
||||
|
||||
|
||||
@@ -18,16 +18,6 @@
|
||||
"until": "2026-11-30",
|
||||
"reason": "Follow-up for the reference-site track: three pages per language have no own meta description and fall back to the site description; the seed should give each page one"
|
||||
},
|
||||
"live-seo:heading-levels-skipped": {
|
||||
"off": true,
|
||||
"until": "2026-11-30",
|
||||
"reason": "Follow-up for the block-library track: entryList cards use h3 with no h2 on the archive pages (h1 → h3)"
|
||||
},
|
||||
"live-seo:first-image-not-prioritised-lcp": {
|
||||
"off": true,
|
||||
"until": "2026-11-30",
|
||||
"reason": "Follow-up for the block-library track: on the archive pages the first image is an entryList card, which is not marked priority"
|
||||
},
|
||||
"live-seo:thin-pages-words": {
|
||||
"off": true,
|
||||
"until": "2026-11-30",
|
||||
|
||||
Reference in New Issue
Block a user