Files
ipal-kit/docs/agent/skills/ipal-nav/SKILL.md
T
Radosław SmolińskiandClaude Opus 5.5 6e0f59c62b Docs: reconcile agent, developer and module docs with the code
- 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]>
2026-10-22 17:06:52 +02:00

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 Company dla rynku z AGENTS.md (PL: NIP/REGON, AU: ABN, US: EIN…),
  • etykiety a11y (przycisk menu itp.) — pola w panelu.

Kod

  1. src/globals/Header.ts, Footer.ts — z §6.8; Company.ts — dane firmy (teksty localized), access.read: () => true.
  2. Hook afterChange na każdym globalu: revalidatePath('/', 'layout') (import z next/cache, hooks.md). buildRevalidateHook z 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 przy context.disableRevalidate, inaczej next/cache rzuca „static generation store missing”.
  3. Menu: await resolveNav(header.navItems, locale) z lib/content (plugin) — linki rozwiązane na serwerze do { href, label, internal, newTab, targetProps, children }. Nie twórz lib/navigation.ts.
  4. 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').
  5. 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 z Company.
  6. Logo z Site Settings przez <Media> — nie duplikuj pola w Header.
  7. Podepnij w src/app/(frontend)/[locale]/layout.tsx (pobranie globali przez cached gettery w lib/, 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).