96d9271d64
- Add a [language] table to book.toml. Each key in the table defines a new language with `name` and `default` properties. - Changes the directory structure of localized books. If the [language] table exists, mdBook will now assume the src/ directory contains subdirectories named after the keys in [language]. The behavior is backwards-compatible if you don't specify [language]. - Specify which language of book to build using the -l/--language argument to `mdbook build` and similar, or omit to use the default language. - Specify the default language by setting the `default` property to `true` in an entry in [language]. Exactly one language must have `default` set to `true` if the [language] table is defined. - Each language has its own SUMMARY.md. It can include links to files not in other translations. If a link in SUMMARY.md refers to a nonexistent file that is specified in the default language, the renderer will gracefully degrade the link to the default language's page. If it still doesn't exist, the config's `create_missing` option will be respected instead.
33 lines
510 B
TOML
33 lines
510 B
TOML
[book]
|
|
title = "Localized Book"
|
|
description = "Testing mdBook localization features"
|
|
authors = ["Ruin0x11"]
|
|
language = "en"
|
|
|
|
[rust]
|
|
edition = "2018"
|
|
|
|
[output.html]
|
|
mathjax-support = true
|
|
site-url = "/mdBook/"
|
|
|
|
[output.html.playground]
|
|
editable = true
|
|
line-numbers = true
|
|
|
|
[output.html.search]
|
|
limit-results = 20
|
|
use-boolean-and = true
|
|
boost-title = 2
|
|
boost-hierarchy = 2
|
|
boost-paragraph = 1
|
|
expand = true
|
|
heading-split-level = 2
|
|
|
|
[language.en]
|
|
name = "English"
|
|
default = true
|
|
|
|
[language.ja]
|
|
name = "日本語"
|