Hello,
I have a custom logic from v2 that parsed MarkdownParsedContent (now PageCollectionItemBase) and constructed a new AST as needed.
I have now encountered a different md structure for MarkdownRoot: the typings suggest it should be of type MDCRoot with type: 'root', but the actual queryCollection outputs body of type: 'minimal' and a different object shape:
"body": {
"type": "minimal",
"value": [
[
"h1",
{
"id": "licensing-basics"
},
"Licensing Basics"
],
...
Lurking around in source I see the minimal types in module.d.ts but I see no mention in the docs and they are not exported so clearly purely internal:
type MinimalText = string;
type MinimalElement = [string, Record<string, unknown>, ...MinimalNode[]];
type MinimalNode = MinimalElement | MinimalText;
type MinimalTree = {
type: 'minimal';
value: MinimalNode[];
};
Do I have any control over how is the format chosen between minimal and MDCRoot with children: Array<MDCNode> as before? Or should the minimal types be exposed to be available for typings?
Thanks
Hello,
I have a custom logic from v2 that parsed
MarkdownParsedContent(nowPageCollectionItemBase) and constructed a new AST as needed.I have now encountered a different
mdstructure forMarkdownRoot: the typings suggest it should be of typeMDCRootwithtype: 'root', but the actualqueryCollectionoutputsbodyoftype: 'minimal'and a different object shape:Lurking around in source I see the minimal types in
module.d.tsbut I see no mention in the docs and they are not exported so clearly purely internal:Do I have any control over how is the format chosen between
minimalandMDCRootwithchildren: Array<MDCNode>as before? Or should theminimaltypes be exposed to be available for typings?Thanks