- AGENT.md, skills, PROGRAMISTA, vibe, README and module pages checked against src/ and package.json; every mismatch fixed (consent/analytics loading, revalidation scope, generateStaticParams, construction gating, Turnstile fail modes, email/Graph, MCP, i18n, links, slug, hooks, ...) - New pages: frontend.md, media.md, integrations.md; docs/README.md now indexes every page - Main rule (plugin helps, never limits) at the top of AGENT.md, PROGRAMISTA.md, docs/README.md, README and the setup/plugin-gap skills; module pages gain a "Wyłączenie, nadpisanie, rozszerzenie" section - README/PROGRAMISTA: stop telling projects to install packages ipal-kit already depends on; peer table; publish flow matches prepublishOnly - ipal-skills: refuse --dest without a value or pointing at the project root (previously could delete ipal-* folders in cwd) - docsConsistency: option keys, IPAL_* env names, relative links, README index, AGENT.md section refs, skill frontmatter, frontend.md helper keys, no `pnpm add` of own dependencies Co-Authored-By: Claude Opus 5.5 <[email protected]>
2.4 KiB
2.4 KiB
name, description
| name | description |
|---|---|
| ipal-nav | Builds the site header, footer, mobile menu and company data in an ipal-kit project — Header/Footer/Company globals with buildLinkField from the plugin, server-side link resolution (resolveNav from the plugin), a small client MobileNav, legal links from System Pages, revalidation on change. Use when creating or changing navigation, menu, header, footer, contact details, social links or the company global. |
ipal-nav
Gotowy kod: resources/kod-nawigacji.md (ten skill). Reguły: AGENT.md §6.8.
Wymaga prymitywów z ../ipal-block/resources/kod-sekcji.md (jak skill ipal-block, krok 0).
Plan (zapisz, potem od razu kod — AGENT.md §0a)
- pozycje menu (jeden poziom podmenu, nie głębiej), CTA w nagłówku (
links), - kolumny stopki, notka,
- model
Companydla rynku z AGENTS.md (PL: NIP/REGON, AU: ABN, US: EIN…), - etykiety a11y (przycisk menu itp.) — pola w panelu.
Kod
src/globals/Header.ts,Footer.ts— z §6.8;Company.ts— dane firmy (teksty localized),access.read: () => true.- Hook
afterChangena każdym globalu:revalidatePath('/', 'layout')(import znext/cache, hooks.md).buildRevalidateHookz pluginu jest tylko dla kolekcji ze slugiem — globali nie odświeża. Pomiń wywołanie poza serwerem Next (!process.env.NEXT_RUNTIME— seed, migracja) i przycontext.disableRevalidate, inaczejnext/cacherzuca „static generation store missing”. - Menu:
await resolveNav(header.navItems, locale)zlib/content(plugin) — linki rozwiązane na serwerze do{ href, label, internal, newTab, targetProps, children }. Nie twórzlib/navigation.ts. src/components/layout/Header.tsx,Footer.tsx(serwer),MobileNav.tsx('use client', tylko stan otwarcia, dane przez props,import type { NavItem } from '@intecion/ipal-kit').- Linki prawne w stopce z ról System Pages:
getSystemLinks(locale)(href + tytuł strony) — nie jako ręczne pozycje. Rok w copyright z kodu, nazwa zCompany. - Logo z Site Settings przez
<Media>— nie duplikuj pola w Header. - Podepnij w
src/app/(frontend)/[locale]/layout.tsx(pobranie globali przez cached gettery wlib/, przekazanie jako props).
Weryfikacja
Skill ipal-audit. Ręcznie: dodanie pozycji menu w panelu widać od razu po zapisie; menu mobilne działa z klawiatury (Tab, Enter, Esc).