You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add .mdx to DOC_EXTENSIONS for MDX-based static sites (Next.js, Docusaurus, Astro) #428
graphifyy (v0.4.21) hardcodes documentation file extensions to {'.md', '.txt', '.rst'}. As a result .mdx files are silently skipped during indexing, even when an entire docs/blog corpus is .mdx.
Looking at the relevant constant (best-guess based on observed behavior — let me know if I'm pointing at the wrong file):
DOC_EXTENSIONS= {'.md', '.txt', '.rst'}
Adding .mdx would make the tool work cleanly for the large and growing population of MDX-driven static sites:
Next.js content-collections / app/blog/**/*.mdx
Docusaurus (.mdx is the default authoring format in v3+)
Astro content collections
Gatsby with gatsby-plugin-mdx
Storybook docs (*.stories.mdx)
Why it matters in practice
Real example: I'm running Graphify on a Next.js codebase with 67 blog posts, all .mdx. With the current extension set, 0 of 67 are indexed. The use case I was hoping to validate — semantic linking from blog content to backend code — can't even start.
MDX is structurally just Markdown with embedded JSX. The doc-extraction path should treat it the same as .md. The JSX components inside (<Image />, <Callout />, etc) can either be ignored or extracted as additional graph nodes, but baseline acceptance of the file extension would unblock most users.
Suggested change
DOC_EXTENSIONS= {'.md', '.mdx', '.txt', '.rst'}
If MDX needs special parsing logic to handle the JSX tags cleanly, a follow-up enhancement could parse them — but the conservative win is just accepting the extension and using the existing markdown parser; the JSX is already valid Markdown content from a text-extraction standpoint.
Happy to test against my codebase if a branch lands. Thanks for shipping the tool — the AST path on the engine repo (~800 nodes / 2K edges in 2.3s) was a clean install on Windows 11.
Activity
v0.4.22: fix Graphify-Labs#429 AST cache root, fix Graphify-Labs#428 …
v0.4.22: fix #429 AST cache root, fix #428 add .mdx to DOC_EXTENSIONS
v0.4.22: fix Graphify-Labs#429 AST cache root, fix Graphify-Labs#428 …