MCPcopy Create free account
hub / github.com/adobe/react-spectrum / getMdxPath

Function getMdxPath

packages/dev/s2-docs/scripts/generateAgentSkills.mjs:357–361  ·  view source on GitHub ↗

* 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)

Source from the content-addressed store, hash-verified

355 * @returns {string} - The full path to the MDX file
356 */
357function 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.

Callers 1

categorizeEntriesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected