Add documentation about additional-js
This commit is contained in:
parent
4528e24080
commit
094c1e7a52
|
@ -2,7 +2,8 @@
|
|||
|
||||
You can configure the parameters for your book in the ***book.toml*** file.
|
||||
|
||||
**Note:** JSON configuration files were previously supported but have been deprecated in favor of
|
||||
>**Note:**
|
||||
JSON configuration files were previously supported but have been deprecated in favor of
|
||||
the TOML configuration file. If you are still using JSON we strongly encourage you to migrate to
|
||||
the TOML configuration because JSON support will be removed in the future.
|
||||
|
||||
|
@ -63,12 +64,13 @@ source = "my-src" # the source files will be found in `root/my-src` instead of
|
|||
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]`.
|
||||
The following configuration options are available:
|
||||
|
||||
- **destination:** By default, the HTML book will be rendered in the `root/book` directory, but this option lets you specify another
|
||||
- **`destination`:** By default, the HTML book will be rendered in the `root/book` directory, but this option lets you specify another
|
||||
destination fodler.
|
||||
- **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.
|
||||
- **curly-quotes:** Convert straight quotes to curly quotes, except for those that occur in code blocks and code spans. Defaults to `false`.
|
||||
- **google-analytics:** If you use Google Analytics, this option lets you enable it by simply specifying your ID in the configuration file.
|
||||
- **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.
|
||||
- **`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.
|
||||
- **`curly-quotes`:** Convert straight quotes to curly quotes, except for those that occur in code blocks and code spans. Defaults to `false`.
|
||||
- **`google-analytics`:** If you use Google Analytics, this option lets you enable it by simply specifying your ID in the configuration file.
|
||||
- **`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.
|
||||
- **`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.
|
||||
|
||||
**book.toml**
|
||||
```toml
|
||||
|
@ -82,5 +84,6 @@ theme = "my-theme"
|
|||
curly-quotes = true
|
||||
google-analytics = "123456"
|
||||
additional-css = ["custom.css", "custom2.css"]
|
||||
additional-js = ["custom.js"]
|
||||
```
|
||||
|
||||
|
|
Loading…
Reference in New Issue