| Crates.io | mdbook-files |
| lib.rs | mdbook-files |
| version | 0.2.0 |
| created_at | 2023-12-16 21:35:02.576766+00 |
| updated_at | 2023-12-29 23:43:50.79514+00 |
| description | Preprocessor for mdbook which renders files from a directory as an interactive widget |
| homepage | |
| repository | https://github.com/xfbs/mdbook-files |
| max_upload_size | |
| id | 1072013 |
| size | 385,374 |
Preprocessor for mdBook which renders files from a directory as an interactive widget, with syntax highlighting.

You can run the example by launching mdbook in the example directory in this
repository.
mdbook serve
Install mdbook-files using cargo:
cargo install mdbook-files
Put the following into your book.toml:
[preprocessor.files]
prefix = "examples"
The prefix is a path, relative to which files are to be included. It is mandatory to give a prefix. Every include path in the book must be within this prefix.
You will also need to add the style.css from this repository to your list of
extra CSS files:
[output.html]
additional-css = ["style.css"]
To use it, add something like this to your book:
```files
title = "Files in subfolder"
paths = ["subfolder/**"]
```
This will produce a widget with all files in examples/subfolder, with the given
title. The content of this is a TOML document which contains configuration.
MIT.