-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Open
Labels
C-enhancementCategory: Enhancement or feature requestCategory: Enhancement or feature request
Description
Problem
Right now if I would like to include a source file I need to use something like this: {{#include file.rs}}
I also need to wrap it with
```rust
```
I would also like to add the name of the file above the included file
And maybe even make it a link to the file in my github repository.
Proposed Solution
It would be nice to be able to write something like:
{% include file.rs %}
That would be expanded to something like this:
```rust
[**examples/intro/hello/src/main.rs**](https://github.com/szabgab/rust.code-maven.com/blob/main/slides/rust/examples/intro/hello/src/main.rs)
{{#include examples/intro/hello/src/main.rs }}
```
The programming language would be deducted from the file-extension.
It would be nice if mdbook had all kinds of extension like this using the liquid-like format, but for quicker solution it might be a preprocessors. Maybe it could be added to embedify.
What do you think @MR-Addict ?
Metadata
Metadata
Assignees
Labels
C-enhancementCategory: Enhancement or feature requestCategory: Enhancement or feature request