mdBook
mdBook copied to clipboard
Is there a way to use own markdown short code templates?
Question
I want to customize the #include short code (I believe implemented using handlebar templates) so that the I could output the path of the included file as well as its content, e.g.,
book/ch1/example1.rs
fn main() {}
I was thinking this could be achieved by somehow including my template, e.g.,
{{#myinclude path/to/file}}
It is possible to do that using mdbook itself or do I need a preprocessor? If so, any recommendations? Thanks,
Version
No response
You will likely need a preprocessor for that use case.
pitty... because such templates are very useful and can be easily implemented using the already builtin handlebar functionality.
I'm going to close per the comment above.