You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/development/language-matching.md
+21Lines changed: 21 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,6 +22,27 @@ The language detection system intelligently identifies programming languages fro
22
22
23
23
Language definitions are stored in [src/assets/config/languages.yaml](https://github.com/MR-Addict/mdbook-embedify/tree/main/src/assets/config/languages.yaml). Each language entry supports multiple matching strategies.
24
24
25
+
### Custom Configuration
26
+
27
+
> Attention 💥
28
+
>
29
+
> Support since [v0.3.2](https://github.com/MR-Addict/mdbook-embedify/releases/tag/v0.3.2).
30
+
31
+
You can override or extend the language detection rules in your `book.toml`. This is useful when you want to add support for new file extensions or modify existing detection rules without waiting for a new release.
32
+
33
+
Example `book.toml` configuration:
34
+
35
+
```toml
36
+
[preprocessor.embedify]
37
+
# Add .dockerfile extension to dockerfile language
Copy file name to clipboardExpand all lines: docs/src/local/include.md
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,11 @@
6
6
>
7
7
> Language is detected by file extension, which I manually referred, simplified and extended from [linguist](https://github.com/github-linguist/linguist/blob/main/lib/linguist/languages.yml).
8
8
>
9
-
> If you find any issues with the language detection, please open an [issue](https://github.com/MR-Addict/mdbook-embedify/issues). Currenltly language map is under [languages.yaml](https://github.com/MR-Addict/mdbook-embedify/blob/main/src/assets/config/languages.yaml)
9
+
> If you find any issues with the language detection, please open an [issue](https://github.com/MR-Addict/mdbook-embedify/issues). Currenltly language map is under [languages.yaml](https://github.com/MR-Addict/mdbook-embedify/blob/main/src/assets/config/languages.yaml).
10
+
11
+
> Tip 💡
12
+
>
13
+
> You can customize language detection rules in your `book.toml`. See [Language Matching](../development/language-matching.md#custom-configuration) for details.
10
14
11
15
The include app is for including source file and wrapping it as markdown code block.
0 commit comments