From f3e6371ef61f9069f02bdde0f966177aa131a2ff Mon Sep 17 00:00:00 2001 From: Centaur AI Date: Thu, 30 Apr 2026 17:09:41 +0000 Subject: [PATCH] fix: rewrite inter-TIP .md links to extensionless paths during sync MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit tip-1046.md links to ./tip-1011.md, but synced files are .mdx — Vocs dead-link checker fails. Strip the .md extension so Vocs resolves them correctly. Amp-Thread-ID: https://ampcode.com/threads/T-019ddf27-3326-76bc-a4fc-b6b9ecd707bd Co-authored-by: Amp --- vite.config.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vite.config.ts b/vite.config.ts index 9dfd437..aea1b13 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -118,6 +118,9 @@ function syncTips(): Plugin { /\(\.\/tip_template\.md\)/g, '(https://github.com/tempoxyz/tempo/blob/main/tips/tip_template.md)', ) + // Rewrite inter-TIP links from ./tip-NNNN.md to ./tip-NNNN (synced as .mdx, + // Vocs resolves extensionless paths). + content = content.replace(/\(\.\/tip-(\d+)\.md\)/g, '(./tip-$1)') // Escape angle brackets outside of code blocks/inline code so MDX doesn't // treat them as JSX (e.g. `Mapping` in prose). content = escapeAngleBrackets(content)