fix: resolve TypeScript error and static export compatibility#10
Conversation
- Fix TypeScript error in MDX components by separating components and options - Remove llms.mdx API route (incompatible with static export) - Add postbuild script to generate static .mdx files for LLM consumption - Update getLLMText to fallback to raw text if processed unavailable
Pull Request ReviewSummaryThis PR successfully resolves TypeScript errors and static export compatibility issues by refactoring the MDX components API and replacing the dynamic API route with a postbuild script that generates static MDX files. The approach is sound and aligns well with Next.js static export constraints. ✅ Strengths
🔍 Code Quality Observations
|
Changes
llms.mdxAPI route (incompatible with static export)getLLMTextto fallback to raw text if processed unavailableProblem
The build was failing with a TypeScript error and the
llms.mdxAPI route was incompatible with Next.js static export (output: export).Solution
getMDXComponentsto accept components and options as separate parameters/docs/*.mdxpaths for LLM consumptionTesting
out/docs/