-
Notifications
You must be signed in to change notification settings - Fork 10
Add extensible LLMS Markdown serializers for custom MDX/JSX components #134
Copy link
Copy link
Open
Description
Summary
SolidBase currently generates LLMS/document-markdown output by converting route content into Markdown-oriented text, but custom MDX/JSX components cannot be serialized with guaranteed semantics.
We can normalize built-in wrappers, but user-defined JSX components are still ambiguous without an explicit conversion.
Goal
Add an extension that lets users define how custom MDX/JSX components should be converted into plain Markdown for LLMS export.
Proposed Direction
Add an LLMS/document-markdown serializer registry, for example under config:
llms: {
componentSerializers: {
Callout(node, ctx) {
// return mdast nodes or markdown text
},
ApiTable(node, ctx) {
// custom conversion
},
},
unknownComponentBehavior: "flatten" | "warn" | "error" | "drop",
}Requirements
- guarantee plain Markdown output for LLMS artifacts
- allow user-defined serializers for custom JSX components
- provide a configurable fallback for unknown components
- support a strict mode that fails generation on unknown JSX
- keep output deterministic and testable
Acceptance Criteria
- custom JSX components can be serialized through config without patching library internals
- unknown JSX does not silently leak raw MDX into .md LLMS output
- strict mode can fail generation when unsupported JSX is encountered
- docs explain serializer behavior, fallback modes, and strict mode
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels