Skip to content

Advanced features when including files #2366

Open
@jcelerier

Description

@jcelerier

Problem

Hello,
I have some documentation with mdbook which heavily reference material under the form of source files, which I include for instance like this :

```
{{ #include some/file }}
```

Now I would like to globally control how this pattern is rendered, for instance automatically display a link to the source file in the git repository for easy access. What would be the best way to do this ? Most likely this cannot be done in the theme as by then the content has already been copied.

Proposed Solution

What would solve my immediate problem: an option in [output.html] such as display-include-file-links = true which would render a small bar above each code block with a link to the included file. The host could be provided in another option, e.g. for instance to point to source files hosted on github in the source repository.

Notes

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-enhancementCategory: Enhancement or feature request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions