From bf4699bf975e5b89798a7f6097685cc1d5e79dd0 Mon Sep 17 00:00:00 2001 From: "chip-peanut-bot[bot]" <262992217+chip-peanut-bot[bot]@users.noreply.github.com> Date: Fri, 20 Mar 2026 16:20:46 +0000 Subject: [PATCH] feat: dynamic SEO footer from content manifest Replace hardcoded arrays in SEOFooter.tsx with import from @/content/generated/footer-manifest.json (generated by peanut-content). New structure: 4 columns (Send Money, Compare, Articles, Resources). Send Money combines to/from entries in one column. Requires: peanutprotocol/peanut-content#15 merged + submodule updated. --- src/components/LandingPage/SEOFooter.tsx | 162 ++++++++++------------- 1 file changed, 67 insertions(+), 95 deletions(-) diff --git a/src/components/LandingPage/SEOFooter.tsx b/src/components/LandingPage/SEOFooter.tsx index c4c3869eb..3a84f8ebc 100644 --- a/src/components/LandingPage/SEOFooter.tsx +++ b/src/components/LandingPage/SEOFooter.tsx @@ -1,112 +1,84 @@ import Link from 'next/link' +import footerManifest from '@/content/generated/footer-manifest.json' -// Curated "seed list" for Google crawl discovery. Renders below the main footer -// on non-marketing pages (homepage, /exchange, /lp, etc.). Marketing pages don't -// need this — they already have RelatedPages + CountryGrid linking to sibling content. +// SEO footer driven by peanut-content's generated/footer-manifest.json. +// To update: add `featured: true` to content frontmatter, run +// `node scripts/generate-footer-manifest.js` in peanut-content, and deploy. // -// Data is inlined (not imported from @/data/seo) because Footer.tsx is bundled -// by webpack for client-routed pages (e.g. /exchange) — importing fs-dependent -// modules would break the build. -// -// IMPORTANT: Only list slugs that have published content in peanut-content. -// The validate-links CI in peanut-content catches broken internal links, but -// this file lives in peanut-ui — verify manually when editing. +// JSON import is webpack-safe for client bundles (no fs dependency). + +interface FooterLink { + slug: string + name: string + href: string + external?: boolean +} + +const linkClass = 'text-xs text-white underline hover:text-white/70' + +function FooterColumn({ title, children }: { title: string; children: React.ReactNode }) { + return ( +