* Get the MDX file path for a given entry. * * @param {string} sourceDir - The source directory (e.g., "s2" or "react-aria") * @param {string} entryPath - The path from llms.txt (e.g., "Button.md") * @returns {string} - The full path to the MDX file
(sourceDir, entryPath)
| 355 | * @returns {string} - The full path to the MDX file |
| 356 | */ |
| 357 | function getMdxPath(sourceDir, entryPath) { |
| 358 | // Convert .md path to .mdx path (e.g., "Button.md" -> "Button.mdx") |
| 359 | const mdxRelPath = entryPath.replace(/\.md$/, '.mdx'); |
| 360 | return path.join(MDX_PAGES_DIR, sourceDir, mdxRelPath); |
| 361 | } |
| 362 | |
| 363 | /** |
| 364 | * Map section names to category keys. |