nix
to the default set of languages supported for syntax highlighting. #2262output.html.curly-quotes
option has been renamed to output.html.smart-punctuation
to better reflect what it does. The old option curly-quotes
is kept for compatibility, but may be removed in the future. #2327mdbook serve
and mdbook watch
now uses a poll-based watcher instead of the native operating system notifications. This should fix issues on various systems and environments, and more accurately detect when files change. The native watcher can still be used with the --watcher native
CLI option. #2325mdbook test
output now includes color, and shows relative paths to the source. #2259SUMMARY.md
from being indented into the previous nested section. #2364@import
in the CSS. #2260src/theme
directory has been removed. #2263pathdiff
dependency optional based on the watch
feature. #2291s
shortcut key handler should not trigger when focus is in an HTML form. #2311mdbook serve
or mdbook watch
were given certain kinds of paths. #2229book.text-direction
setting for explicit support for right-to-left languages. #1641rel=prefetch
to the “next” links to potentially improve browser performance. #2168.warning
CSS class which is styled for displaying warning blocks. #2187color-scheme
CSS property is now set based on the light/dark theme, which applies some slight color differences in browser elements like scroll bars on some browsers. #2134toml
crate (again!). This was an unintentional breaking change in 0.4.32. #2021#
and classes with .
. For example: ## My heading {#custom-id .class1 .class2}
#2013output.html.code.hidelines
table allows you to define the prefix character that will be used to hide code lines based on the language. #2093fonts/fonts.css
is overridden in the theme directory. Additionally, the warning about copy-fonts
has been removed if fonts/fonts.css
is specified. #2080mdbook init --force
now skips all interactive prompts as intended. #2057gitignore
library to ignore
. This should bring some improvements with gitignore handling. #2076mdbook test
. #1986toml
crate. This was an unintentional breaking change in 0.4.26. #2021The 0.4.26 release has been yanked due to an unintentional breaking change.
output.html.copy-fonts
option has been deprecated. To define custom fonts, be sure to define theme/fonts.css
. #1987mdbook test -L deps path-to-book
would not work. #1959--chapter
option to mdbook test
to specify a specific chapter to test. #1741<kbd>
tags. #1906x86_64-unknown-linux-musl
and aarch64-unknown-linux-musl
(see Releases). #1862build.extra-watch-dirs
which is an array of additional directories to watch for changes when running mdbook serve
. #1884type="text/javascript"
attribute from <script>
tags. #1881serve
command now supports HEAD requests. #1825index.html
file. Previously it would only generate the index file for prefix chapters. #1829mdbook serve --open
now properly handles the case if the first chapter is a draft. #1714 #1830output.html.print
configuration table. #1775output.html.print.page-break
config option to control whether or not there is a page break between chapters in the print output. #1728output.html.playground.runnable
config option to globally disable the run button in code blocks. #1546mdbook serve
live reload websocket now uses the protocol, host, and port of the current page, allowing access through a proxy. #1771SUMMARY.md
when it didn't start with a title. #1744theme/head.hbs
file instead. #1675opener
crate for opening a web browser, which should fix some issues with blocking. #1656mdbook completions
subcommand which provides shell completions. #1425--title
and --ignore
flags to mdbook init
to avoid the interactive input. #1559warp
(the web server) to the latest version. This also updates the minimum supported Rust version to 1.46. #1612output.html.playground.editable
is true
. #1613__non_exhaustive
marker on the Book
struct. #1572chapter_begin
id on the print page's chapter separators. #1541book.toml
are no longer ignored. #1539mdbook serve
fails to start the http server. #1555edit-url-template
if the book used a source directory other than src
. #1554output.html.edit-url-template
which can be a URL which is linked on each page to direct the user to a site (such as GitHub) where the user can directly suggest an edit for the page they are currently reading. #1506SUMMARY.md
. #1437light
theme to improve accessibility. #1470?highlight
argument from the URL. #1427mdbook init --theme
will now place the theme in the root of the book directory instead of in the src
directory. #1432command
to a relative path now interprets the relative path relative to the book root. Previously it was inconsistent based on the platform (either relative to the current directory, or relative to the renderer output directory). Paths relative to the output directory are still supported with a deprecation warning. #1418theme
directory in the config is now interpreted as relative to the book root, instead of the current directory. #1405{{#playground}}
snippets. #1375<
and >
characters in the table of contents. #1376build
table in the config, which prevented setting it in the API. #1378output.html.print.enable
configuration value to disable the “print” page. #1169src
directory. #1323output.html.cname
option to emit a CNAME
file which is used by GitHub Pages to know which domain is being used. #1311mdbook test
no longer stops on the first test failure, but instead will run all the tests. #1313local
font source for Source Code Pro, as the locally installed font may not render properly on FireFox on macOS. #1307%20
spaces. #1293<link>
tag. #1272--websocket-hostname
and --websocket-port
from the serve
command. #1211site-url
setting in the book configuration so mdbook can generate the links correctly. Alternatively you can disable the 404 page generation, or set up your own 404 handling in your web server. #1221debug
and output
features have been removed as they were unused. #1211preferred-dark-theme
config setting, as it now defaults to “navy”. #1199{{#playpen}}
will now display warnings. This may impact books that have modified the “playpen” elements in the theme. #1241optional
setting for that renderer. #1122[rust]
configuration section to book.toml
, which allows setting the default edition with edition = "2018"
. #1163optional
, so that they will be ignored if the renderer is not installed. #1122head.hbs
to allow adding content to the <head>
section in HTML. #1206SUMMARY.md
to signify different sections. #1171allow(unused_variables)
to allow(unused)
. #1195copy-fonts
option was added to disable this if you want to supply your own fonts. #1188serve
command to a new implementation. This results in some internal differences in how websockets are handled, which removes the separate websocket options. This should also make it easier to serve multiple books at once. #1211+
symbol should now work. #1208MDBOOK_BOOK
environment variable now correctly allows overriding the entire book configuration. #1207no_run
code samples. #1249--dest-dir
command-line option for the serve
and watch
commands. #1228text
input fields (for example, typing S
in a custom text input field). #1244src
directory, and instead add a check that prevents infinite copies. #1181 #1026MDBook::execute_build_process
is now publicly accessible in the API so that plugins can more easily initiate the build process. #1099<p>
, <ul>
, and <ol>
. #1136mdbook serve
will retain the current scroll position when the page is reloaded. #1097-
. #1145rel=next
and rel=previous
are now supported in “wide” mode (previously they were only set in narrow mode). #1150default-theme
config setting is now case-insensitive. #1079#
hidden Rust code lines not rendering properly. #1088rem
font sizes from px
. #894output.html.playpen.line-numbers
configuration value. #1035watch
and serve
commands will now ignore files listed in .gitignore
. #1044prefers-color-scheme
feature. This may be enabled by setting output.html.preferred-dark-theme
to your preferred dark theme. #1037rustdoc_include
preprocessor. This makes it easier to include portions of an external Rust source file. The rest of the file is hidden, but the user may expand it to see the entire file, and will continue to work with mdbook test
. #1003output.html.playpen.copyable
configuration option to disable the copy button. #1050output.html.fold
configuration to enable this feature. #1027scrollbar-color
CSS along with webkit extension #816[output.html]
config are no longer ignored. #1033clean
multiple times. #1055inline-block
for inline code
, fixing selection highlighting and some rendering issues. #1058scrollTop
. #1070language
configuration value to set the language of the book, which will affect things like the <html lang="en">
tag. #941load_with_config_and_summary
function to MDBook
to be able to build a book with a custom Summary
. #883noindex
on print.html
page to prevent robots from indexing it. #844same-file
crate. #903with_preprecessor
to with_preprocessor
. #906diff
language should now highlight correctly. #943mdbook serve
only reloads once when multiple files are changed at once. #870additional-js
files. #796code spans
that are links. #905file
urls. #915SUMMARY.md
in mdbook init
. #841print.html
. #871git-repository-url
and git-repository-icon
options in the [output.html]
section to enable it and set its appearance. #802default-theme
option to the [output.html]
section. #804a
character for headers that start with a non-ascii-alphabetic character. #788🎉 Process-based custom preprocessors. See the docs for more. #792
🎉 Configurable preprocessors.
Added build.use-default-preprocessors
boolean TOML key to allow disabling the built-in links
and index
preprocessors.
Added [preprocessor]
TOML tables to configure each preprocessor.
Specifying [preprocessor.links]
or [preprocessor.index]
will enable the respective built-in preprocessor if build.use-default-preprocessors
is false
.
Added fn supports_renderer(&self, renderer: &str) -> bool
to the Preprocessor
trait to specify if the preprocessor supports the given renderer. The default implementation always returns true
.
Preprocessor::run
now takes a book by value instead of a mutable reference. It should return a Book
value with the intended modifications.
Added PreprocessorContext::renderer
to indicate the renderer being used.
💥 This release changes how links are handled in mdBook. Previously, relative links were interpreted relative to the book's root. In 0.2.0
+ links are relative to the page they are in, and use the .md
extension. This has several advantages, such as making links work in other markdown viewers like GitHub. You will likely have to change links in your book to accommodate this change. For example, a book with this layout:
chapter_1/ section_1.md section_2.md SUMMARY.md
Previously a link in section_1.md
to section_2.md
would look like this:
[section_2](chapter_1/section_2.html)
Now it must be changed to this:
[section_2](section_2.md)
💥 mdbook test --library-path
now accepts a comma-delimited list of arguments rather than taking all following arguments. This makes it easier to handle the trailing book directory argument without always needing to put --
before it. Multiple instances of the option continue to be accepted: mdbook test -L foo -L bar
.
💥 mdbook serve
has some of its options renamed for clarity. See mdbook help serve
for details.
Embedded rust playpens now use the “stable” playground API. #754