Replies: 1 comment
-
I'm also interested by this feature. I have also tried different solution without success. I know that we can import markdown as a component, but my main concern is that those components will then be part of the bundle. If preprocessing was possible, we could import the markdown content inside a markdown without extra layer of javascript bundling. This will dramatically reduce the bundle size and improve prefromances |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
I'm trying to break up a large Markdown (.mdx) file into multiple smaller ones, where each one has footnotes:
In
parent.mdx
:In
child1.mdx
:In
child2.mdx
:Since each child MDX is compiled then included in parent MDX, this results in 2 separate footnotes sections rather that 1 unified footnote section, as desired. What I want is true transclusion of the raw text (something like
#include
), ideally a solution that supports recursion (i.e. child can also#include
a snippet).What I've tried
remark
to parse regular MD files and doesn't seem to work for MDX.gatsby-plugin-mdx
.File
'snode.internal.content
inonCreateNode
to concatenate the raw text, butgatsby-plugin-mdx
doesn't seem to be affected.gatsby-plugin-mdx
as noted in [gatsby-plugin-mdx] Remark plugins using mutateSource seems to be ignored #23409Any ideas?
Motivation
Particularly for large projects, it's useful to break posts into more manageable chunks.
Beta Was this translation helpful? Give feedback.
All reactions