-
|
We're testing the "Importing Markdown" feature for our multi-platform SDK documentation. In our case, a single MDX containing the whole content of the page (along with some custom conditional processing) is imported by each platform's parent documents. Some of the pages will use this import scheme, while the rest of pages will be in plain Markdown. However, it seems that Is there a way to export the A workaround might be be using |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
I don't think we generate any description here: either you provide it explicitly, or you don't. The description generation does not happen at the front matter level, and the front matter object remains untouched with Afaik we don't allow any front-matter on partials because we don't use any.
No I don't think we have support for that. My goal in Docusaurus v3 is to introduce a Markdown directive syntax like this: ::import{path='./_markdown-partial-example.mdx'}Unlike JSX imports, the imported content would be "inlined" inside the parent page, and the description generation (not based on front matter) would be able to see the imported content. This would also fix the TOC problem, see #3915 |
Beta Was this translation helpful? Give feedback.
-
|
Thank you for detailed explanation. Regarding the TOC issue, the only workaround in Docusaurus v2.x seems to be exporting the TOC of a partial and injecting it into the swizzled TOC-related components (replacing the TOC of the page importing the partial), but this works only for a scenario using partials for whole-page content, so it's limited. Good to hear that the limitation can be resolved in v3. |
Beta Was this translation helpful? Give feedback.
I don't think we generate any description here: either you provide it explicitly, or you don't. The description generation does not happen at the front matter level, and the front matter object remains untouched with
description: undefinedunless provided explicitly.Afaik we don't allow any front-matter on partials because we don't use any.
No I don't think we have support for that.
My goal in Docusaurus v3 is to introduce a Markdown d…