Skip to content

Commit 094c1e7

Browse files
azerupibudziq
authored andcommitted
Add documentation about additional-js
1 parent 4528e24 commit 094c1e7

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

book-example/src/format/config.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
You can configure the parameters for your book in the ***book.toml*** file.
44

5-
**Note:** JSON configuration files were previously supported but have been deprecated in favor of
5+
>**Note:**
6+
JSON configuration files were previously supported but have been deprecated in favor of
67
the TOML configuration file. If you are still using JSON we strongly encourage you to migrate to
78
the TOML configuration because JSON support will be removed in the future.
89

@@ -63,12 +64,13 @@ source = "my-src" # the source files will be found in `root/my-src` instead of
6364
The HTML renderer has a couple of options aswell. All the options for the renderer need to be specified under the TOML table `[output.html]`.
6465
The following configuration options are available:
6566

66-
- **destination:** By default, the HTML book will be rendered in the `root/book` directory, but this option lets you specify another
67+
- **`destination`:** By default, the HTML book will be rendered in the `root/book` directory, but this option lets you specify another
6768
destination fodler.
68-
- **theme:** mdBook comes with a default theme and all the resource files needed for it. But if this option is set, mdBook will selectively overwrite the theme files with the ones found in the specified folder.
69-
- **curly-quotes:** Convert straight quotes to curly quotes, except for those that occur in code blocks and code spans. Defaults to `false`.
70-
- **google-analytics:** If you use Google Analytics, this option lets you enable it by simply specifying your ID in the configuration file.
71-
- **additional-css:** If you need to slightly change the appearance of your book without overwriting the whole style, you can specify a set of stylesheets that will be loaded after the default ones where you can surgically change the style.
69+
- **`theme`:** mdBook comes with a default theme and all the resource files needed for it. But if this option is set, mdBook will selectively overwrite the theme files with the ones found in the specified folder.
70+
- **`curly-quotes`:** Convert straight quotes to curly quotes, except for those that occur in code blocks and code spans. Defaults to `false`.
71+
- **`google-analytics`:** If you use Google Analytics, this option lets you enable it by simply specifying your ID in the configuration file.
72+
- **`additional-css`:** If you need to slightly change the appearance of your book without overwriting the whole style, you can specify a set of stylesheets that will be loaded after the default ones where you can surgically change the style.
73+
- **`additional-js`:** If you need to add some behaviour to your book without removing the current behaviour, you can specify a set of javascript files that will be loaded alongside the default one.
7274

7375
**book.toml**
7476
```toml
@@ -82,5 +84,6 @@ theme = "my-theme"
8284
curly-quotes = true
8385
google-analytics = "123456"
8486
additional-css = ["custom.css", "custom2.css"]
87+
additional-js = ["custom.js"]
8588
```
8689

0 commit comments

Comments
 (0)