Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Advanced features when including files #2366

Open
jcelerier opened this issue Apr 23, 2024 · 0 comments
Open

Advanced features when including files #2366

jcelerier opened this issue Apr 23, 2024 · 0 comments
Labels
C-enhancement Category: Enhancement or feature request

Comments

@jcelerier
Copy link

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

@jcelerier jcelerier added the C-enhancement Category: Enhancement or feature request label Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: Enhancement or feature request
Projects
None yet
Development

No branches or pull requests

1 participant