feat: support .mdx files in page resolver and DocTree scanner #45
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "development_mdx_features"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Adds support for
.mdxfiles throughout the pipeline — page discovery, path resolution, export, search indexing, and web serving..mdxcontent is preserved as-is (no JSX stripping or transformation).Changes (11 files, +108/-44)
src/doctree/utils.rsMARKDOWN_EXTENSIONS,is_markdown_extension(),strip_markdown_extension()helpers + testssrc/doctree/collection.rsext == "md"→is_markdown_extension(&ext). Preserve source extension on export.src/book/resolver.rsfind_page_file(): try.mdxafter.mdfor all candidate patternssrc/doctree/client.rsget_page_path()/list_pages(): support.mdxlookup and filteringsrc/pdf/mod.rs.mdxfallback pathsrc/book/exporter.rs.mdor.mdx) through export pipelinesrc/doctree/link.rs.mdxas page (not file)src/web/server.rs.mdxsrc/webservice/server/rpc.rs.mdxsrc/vectorsdk/indexer.rspage.relative_pathinstead of hardcoded.mdfor metadata lookupsrc/doctree/mod.rsDesign
MARKDOWN_EXTENSIONSconstant — adding future formats (e.g..markdown) requires one change.mdxcontent preserved as-is through the entire pipeline.mdis always tried first (backward compatible).mdxtext contentFuture: full MDX rendering
Full JSX/React component rendering in
.mdxfiles requires a WASM/React runtime, tracked in issue #44. This PR is a prerequisite — it ensures.mdxfiles are discovered and their content preserved faithfully for when that frontend is built.Testing
test_is_markdown_extension,test_strip_markdown_extension)main_intro.mdxandpresentation.mdxwarnings resolved (pages now found by resolver)Closes #43
feat: support .mdx files in page resolver and DocTree scannerto WIP: feat: support .mdx files in page resolver and DocTree scannerdc283fa1cc948b7c4f30WIP: feat: support .mdx files in page resolver and DocTree scannerto feat: support .mdx files in page resolver and DocTree scanner