Skip serializing of the multilingual field

This skips serializing of the multilingual field since it is unused, and
we plan to remove it in the future. This helps avoid it showing up in
`mdbook init`.
This commit is contained in:
Eric Huss
2025-05-05 14:05:00 -07:00
parent c9ddb4dd98
commit 3c10b00096
3 changed files with 3 additions and 5 deletions

View File

@@ -421,6 +421,9 @@ pub struct BookConfig {
/// Location of the book source relative to the book's root directory.
pub src: PathBuf,
/// Does this book support more than one language?
// TODO: Remove this field in 0.5, it is unused:
// https://github.com/rust-lang/mdBook/issues/2636
#[serde(skip_serializing)]
pub multilingual: bool,
/// The main language of the book.
pub language: Option<String>,

View File

@@ -28,7 +28,6 @@ All done, no errors...
[book]
authors = []
language = "en"
multilingual = false
src = "src"
"#]],
@@ -95,7 +94,6 @@ All done, no errors...
[book]
authors = []
language = "en"
multilingual = false
src = "src"
"#]],
@@ -129,7 +127,6 @@ All done, no errors...
[book]
authors = []
language = "en"
multilingual = false
src = "src"
title = "Example title"
@@ -182,7 +179,6 @@ fn init_with_custom_book_and_src_locations() {
[book]
authors = []
language = "en"
multilingual = false
src = "in"
[build]

View File

@@ -188,7 +188,6 @@ fn backends_receive_render_context_via_stdin() {
"book": {
"authors": [],
"language": "en",
"multilingual": false,
"src": "src"
},
"output": {