From ab947230423a7fa157263867350b0d7fb6ce3add Mon Sep 17 00:00:00 2001 From: "chip-peanut-bot[bot]" <262992217+chip-peanut-bot[bot]@users.noreply.github.com> Date: Mon, 23 Mar 2026 16:42:04 +0000 Subject: [PATCH 1/3] chore: bump peanut-content to 35cd834a4494 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Updates src/content submodule (50 commits behind). Changes: • Notify peanut-ui when content is updated on main • Add valid-links.md reference for LLM content generation • Add link validation CI for content PRs • Test: trigger auto-update to peanut-ui • Fix validate-links CI: peanut-ui is public, no token needed • feat: add receive-from-country content (29 pages + template) • Merge pull request #5 from peanutprotocol/feat/receive-from-content • Add workflow to auto-trigger peanut-ui submodule update • Merge pull request #6 from peanutprotocol/ci/notify-ui-on-push • docs: add site integration lifecycle to ARCHITECTURE.md • feat: add missing country, send-to, and deposit content • Merge pull request #8 from peanutprotocol/docs/site-integration-lifecycle • fix: address CR review — diacritics, broken links, TBD placeholders • Content quality: legal hedging, DAI removal, SEPA updates • Merge origin/main: resolve 33 conflicts combining both change sets • feat: add supported-geographies help article • Merge pull request #10 from peanutprotocol/feat/help-supported-geographies • style: format notify-ui workflow • Merge remote-tracking branch 'origin/main' • Merge remote-tracking branch 'origin/main' into feat/seo-missing-content • docs: simplify Site Integration section to brief reference • fix: use locale-prefixed paths in supported-geographies links • Merge pull request #9 from peanutprotocol/feat/seo-missing-content • fix: reframe CPF messaging from negative to positive for pt-br trust • Merge branch 'main' of https://github.com/peanutprotocol/peanut-content • feat: apply human audit feedback to es-ar and pt-br content • fix: fully regenerate remaining pt-br content to eliminate em-dash overuse • fix: replace self-custodial with non-custodial in security data • fix(content): fix broken pt-br links to supported-geographies (#11) • fix: correct supported-geographies link path to /help/supported-geographies • feat: add pt-br translation for supported-geographies help page • Merge pull request #12 from peanutprotocol/chip/pt-br-supported-geographies • feat: P7 MercadoPago cluster + Spain-Argentina locale fill (30 pages) • fix: localize help URLs and add missing es-419 translation • Merge pull request #13 from peanutprotocol/chip/fix-help-locale-links • Merge pull request #7 from peanutprotocol/content/update-help-articles • fix: correct account recovery content — Peanut is self-custodial, no server-side recovery • fix: use #chat CTA instead of /profile/backup to pass link validation • fix: restore /profile/backup CTA (validator updated in peanut-ui#1775) • chore: retrigger CI (peanut-ui#1777 merged) • Merge pull request #14 from peanutprotocol/chip/fix-recovery-self-custody • feat: add featured frontmatter + footer manifest generator • Merge pull request #15 from peanutprotocol/chip/footer-featured-manifest • feat: add user stories system • fix: em-dash cleanup, canonical URLs, broken link, workflow update • Merge pull request #16 from peanutprotocol/chip/user-stories • feat: integrate user interviews into country-hub, use-case, and compare templates • fix: update stale section number references in coming-soon variant and component tables • fix: add stories URLs to valid-links.md • Merge pull request #17 from peanutprotocol/chip/templates-user-stories --- src/content | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content b/src/content index ffc4bdd8a..35cd834a4 160000 --- a/src/content +++ b/src/content @@ -1 +1 @@ -Subproject commit ffc4bdd8ac3925b9f80d77bb5bb6e5f85a3d45b4 +Subproject commit 35cd834a4494e11136099b739fadff1aea4c06ce From d2c1a7f4e734cf15dbe3820b26643cf062fc99f7 Mon Sep 17 00:00:00 2001 From: "chip-peanut-bot[bot]" <262992217+chip-peanut-bot[bot]@users.noreply.github.com> Date: Mon, 23 Mar 2026 16:54:09 +0000 Subject: [PATCH 2/3] fix: skip unpublished content in link validator Content with published: false in frontmatter is now excluded from link validation. Draft content often links to routes that do not exist yet (e.g. /en/stories/*), and these should not block CI. --- scripts/validate-links.ts | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/scripts/validate-links.ts b/scripts/validate-links.ts index 430868946..944cbca3e 100644 --- a/scripts/validate-links.ts +++ b/scripts/validate-links.ts @@ -187,6 +187,30 @@ function isInternalLink(url: string): boolean { return true } +// --- Frontmatter parsing --- + +function parseFrontmatter(content: string): Record { + const match = content.match(/^---\n([\s\S]*?)\n---/) + if (!match) return {} + const frontmatter: Record = {} + for (const line of match[1].split('\n')) { + const colonIdx = line.indexOf(':') + if (colonIdx === -1) continue + const key = line.slice(0, colonIdx).trim() + const value = line.slice(colonIdx + 1).trim() + if (value === 'true') frontmatter[key] = true + else if (value === 'false') frontmatter[key] = false + else frontmatter[key] = value + } + return frontmatter +} + +function isPublished(content: string): boolean { + const fm = parseFrontmatter(content) + // If published is explicitly false, skip the file + return fm.published !== false +} + // --- Scan content files --- function getAllMdFiles(dir: string): string[] { @@ -225,8 +249,17 @@ function main() { const broken: BrokenLink[] = [] let totalLinks = 0 + let skippedUnpublished = 0 + for (const file of files) { const content = fs.readFileSync(file, 'utf-8') + + // Skip unpublished/draft content — links to not-yet-built routes are expected + if (!isPublished(content)) { + skippedUnpublished++ + continue + } + const links = extractLinks(content) totalLinks += links.length @@ -246,7 +279,10 @@ function main() { } // --- Report --- - console.log(`Checked ${totalLinks} internal links across ${files.length} files\n`) + if (skippedUnpublished > 0) { + console.log(` Skipped ${skippedUnpublished} unpublished files\n`) + } + console.log(`Checked ${totalLinks} internal links across ${files.length - skippedUnpublished} published files\n`) if (broken.length === 0) { console.log('✓ No broken internal links found!') From 0ec6c758fdd2a2bfebdb3b7b73d8e2f600d5a01d Mon Sep 17 00:00:00 2001 From: "chip-peanut-bot[bot]" <262992217+chip-peanut-bot[bot]@users.noreply.github.com> Date: Mon, 23 Mar 2026 16:57:50 +0000 Subject: [PATCH 3/3] fix: include app route allowlist in link validator Adds mobile-ui routes (/profile/backup, etc.) to the valid paths index so content linking to in-app routes does not fail CI. Ported from #1777 (merged to main). --- scripts/validate-links.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/scripts/validate-links.ts b/scripts/validate-links.ts index 944cbca3e..7c38bb557 100644 --- a/scripts/validate-links.ts +++ b/scripts/validate-links.ts @@ -42,6 +42,24 @@ function buildValidPaths(): Set { paths.add(p) } + // App routes (behind auth / mobile-ui) — content may link to these + for (const p of [ + '/profile', + '/profile/backup', + '/profile/edit', + '/profile/exchange-rate', + '/profile/identity-verification', + '/home', + '/send', + '/request', + '/settings', + '/history', + '/points', + '/recover-funds', + ]) { + paths.add(p) + } + const countrySlugs = listDirs(path.join(CONTENT_DIR, 'countries')) const competitorSlugs = listDirs(path.join(CONTENT_DIR, 'compare')) const payWithSlugs = listDirs(path.join(CONTENT_DIR, 'pay-with'))