#mdbook #filename #preprocessor #code-block #markdown

bin+lib mdbook-codename

mdbook-codename is a preprocessor for mdBook that displays the filename of your codeblocks

2 releases

0.0.1 Oct 24, 2024
0.0.0 Oct 24, 2024

#7 in #code-block

Download history 23/week @ 2024-11-01 18/week @ 2024-11-08 34/week @ 2024-11-15 11/week @ 2024-12-06 354/week @ 2024-12-27 748/week @ 2025-01-03 24/week @ 2025-01-10 5/week @ 2025-01-17 10/week @ 2025-01-24 5/week @ 2025-01-31 23/week @ 2025-02-07 15/week @ 2025-02-14

55 downloads per month

MIT license

105KB
170 lines

mdbook-codename

Publish

mdbook-codename is a mdBook preprocessor to show a filename of the Markdown codeblock.

When you write a filename of the codeblock, the filename is shown above the codeblock.

```src/test.c
void hello(void) {
  puts("hello!");
}
```

```c:src/test.c
void hello(void) {
  puts("hello!");
}
```

example

Usage

Add the following to your book.toml:

[preprocessor.codename]

Example

To show the example, run the following command:

mdbook serve --open

Dependencies

~14–25MB
~369K SLoC