Audits: performance, responsive and new mandatory items; seo-check content checks
ipal-audit: <video> outside Media, priority outside the hero, <Media> without sizes, raw YouTube iframes, 100vh/h-screen, fixed pixel sizes, page JSON-LD, upload sandbox headers, images preset, missing form seeds; accepts createMarkdownRoute / createSubmitAction. ipal-seo-check: exactly one h1, heading jumps, img alt and dimensions, LCP priority, og:image, thin pages, internal links, X-Robots-Tag noindex left on in production. Verified on bad and good fixtures. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -114,6 +114,18 @@ if [ -n "$BLOCKS" ]; then
|
||||
report ERROR "hardcoded text in blocks" "§2 every visible text comes from the panel (localized field)" \
|
||||
"$(node "$(dirname "$0")/jsx-text.mjs" $BLOCKS 2>/dev/null)"
|
||||
|
||||
report WARNING "<video> outside <Media>" "§6.11b videoMode background|player via Media (videoProps)" \
|
||||
"$(g '<video[ >]' $BLOCKS --include=*.tsx)"
|
||||
|
||||
report WARNING "priority outside the hero" "§6.11b exactly one LCP image per page — priority only in the first section" \
|
||||
"$(g '<Media[^>]*\bpriority\b' $BLOCKS --include=*.tsx | grep -viE '/hero')"
|
||||
|
||||
report WARNING "<Media> without sizes" "§6.11b sizes = width on screen (MEDIA_SIZES.*) — without it the full-width file downloads" \
|
||||
"$(g '<Media[^>]*/>' $BLOCKS --include=*.tsx | grep -v 'sizes=')"
|
||||
|
||||
report WARNING "raw YouTube iframe" "§6.11b <YouTubeEmbed> (iframe only after click, no cookies before)" \
|
||||
"$(g '<iframe[^>]*youtube' src --include=*.tsx)"
|
||||
|
||||
report WARNING "inline <svg> in blocks" "§6.10 icons via media upload or Icon map" \
|
||||
"$(g '<svg[ >]' $BLOCKS --include=*.tsx)"
|
||||
|
||||
@@ -130,6 +142,12 @@ if [ -d src/components ]; then
|
||||
fi
|
||||
|
||||
if [ -n "$UI" ]; then
|
||||
report WARNING "100vh / h-screen" "§6.11a use min-h-[var(--ipal-hero-min-h)] (svh, capped) — 100vh overflows on laptops and mobile bars" \
|
||||
"$(g '\b(h-screen|min-h-screen|h-\[100vh\]|min-h-\[100vh\])' $UI --include=*.tsx)"
|
||||
|
||||
report WARNING "fixed pixel widths/heights" "§6.11a no w-[640px]/h-[500px] in sections — max-w-*, %, aspect-*, min()" \
|
||||
"$(g '\b(w|h|min-w|min-h)-\[[0-9]{3,}px\]' $UI --include=*.tsx)"
|
||||
|
||||
report ERROR "hex colors in classes" "§6.11 use design tokens (bg-primary…)" \
|
||||
"$(g '(bg|text|border|from|to|via|fill|stroke)-\[#' $UI --include=*.tsx)"
|
||||
|
||||
@@ -207,7 +225,8 @@ if [ -n "$APP" ]; then
|
||||
# GEO
|
||||
need ERROR llms "llms.txt" "src/app/llms.txt/route.ts → createLlmsTxtRoute" 'createLlmsTxtRoute|buildLlmsTxt' src/app
|
||||
need ERROR llms-full "llms-full.txt" "src/app/llms-full.txt/route.ts → createLlmsTxtRoute({ full: true })" 'full: *true' src/app/llms-full.txt
|
||||
need ERROR markdown "Markdown route" "src/app/md/[locale]/[[...slug]]/route.ts → createMarkdownRenderer + markdownResponse" 'createMarkdownRenderer' src/app
|
||||
need ERROR markdown "Markdown route" "src/app/md/[locale]/[[...slug]]/route.ts → createMarkdownRoute" 'createMarkdownRoute|createMarkdownRenderer' src/app
|
||||
need WARNING jsonld "page structured data" "[[...slug]]/page.tsx → <JsonLdGraph schemas={await getPageJsonLd(locale, slug)} />" 'getPageJsonLd|buildWebPageJsonLd|buildBreadcrumbJsonLd' src/app
|
||||
need ERROR markdown "Markdown in proxy" "proxy.ts → createProxy(i18nConfig, { NextResponse, markdown: true }) — without it /md/… is redirected to /<locale>/md/…" 'markdown: *(true|['"'"'"])|prefersMarkdown' src/proxy.ts proxy.ts
|
||||
need WARNING markdown "Markdown alternate link" "createContentHelpers({ markdownAlternate: true }) or markdownHref in metadata" 'markdownAlternate|markdownHref' src
|
||||
need ERROR mcp "MCP server" "src/app/api/mcp/route.ts → createMcpRoute (public: AI browses the site)" 'createMcpRoute' src/app
|
||||
@@ -223,7 +242,9 @@ if [ -n "$APP" ]; then
|
||||
need WARNING turnstile "getTurnstileConfig" "siteKey from getTurnstileConfig(payload) — off unless BOTH keys are set" 'getTurnstileConfig' src
|
||||
need WARNING '' "MediaPreconnect" "<MediaPreconnect/> in the layout (R2 CDN preconnect from env)" 'MediaPreconnect' src/app
|
||||
# Forms
|
||||
need ERROR '' "form submission via the plugin" "server action sendForm → submitForm (ipal-form)" 'submitForm' src
|
||||
need ERROR '' "form submission via the plugin" "actions.ts → export const sendForm = createSubmitAction({ getCachedPayload, headers }) (ipal-form)" 'createSubmitAction|submitForm' src
|
||||
need WARNING '' "upload sandbox headers" "next.config.ts → ...buildUploadSecurityHeaders() (uploaded SVG can't run script)" 'buildUploadSecurityHeaders' next.config.ts next.config.mjs next.config.js
|
||||
need WARNING '' "images preset" "next.config.ts → images: { ...buildImagesConfig() } (AVIF/WebP, R2 domain)" 'buildImagesConfig' next.config.ts next.config.mjs next.config.js
|
||||
fi
|
||||
|
||||
if [ -n "$CFG" ]; then
|
||||
@@ -235,6 +256,9 @@ if [ -n "$CFG" ]; then
|
||||
report WARNING "robots blocks AI bots" "§0b.8 — only with the client's decision in AGENTS.md" \
|
||||
"$(skipped aibots || g "aiBots: *'(disallow|block-training)'" src --include=*.ts)"
|
||||
fi
|
||||
if [ -n "$CFG" ] && grep -qE 'forms *:' "$CFG" 2>/dev/null && ! ls scripts/seed-form* >/dev/null 2>&1 && ! skipped forms-seed; then
|
||||
report WARNING "no form seed" "ipal-form §5 — every form from scripts/seed-form-*.ts (notification + sender confirmation, all languages)" "scripts/seed-form-*.ts"
|
||||
fi
|
||||
need WARNING r2 "R2 env in .env.example" ".env.example lists R2_BUCKET, R2_ENDPOINT, R2_ACCESS_KEY_ID, R2_SECRET_ACCESS_KEY, R2_PUBLIC_URL" 'R2_BUCKET' .env.example
|
||||
need WARNING '' "IPAL_IP_HEADER in .env.example" "header the rate limit trusts, e.g. cf-connecting-ip (forms.md)" 'IPAL_IP_HEADER' .env.example
|
||||
|
||||
|
||||
Reference in New Issue
Block a user