realworldocaml / mdx

Execute code blocks inside your documentation
ISC License
269 stars 45 forks source link

Support files inclusion without a block #364

Open arbipher opened 2 years ago

arbipher commented 2 years ago

The feature of file inclusion is cool, but I wonder is it possible to include a file without a block

<!-- $MDX file=my_file.md -->

This will render to (''' are three backticks. I don't figure out how to escape it in github code block)

<!-- $MDX file=my_file.md -->
'''
CONTENT_OF_MY_FILE
'''

I hope to have

<!-- $MDX file=my_file.md -->
CONTENT_OF_MY_FILE

It can be used to split one giant markdown to multiple files.