Commit Graph

3 Commits

Author SHA1 Message Date
Ruin0x11
c72ce182d5 Rewrite links in Markdown to point to fallback if missing in translation
It will follow relative links to other pages and embedded images.
2021-09-15 14:14:47 -07:00
Ruin0x11
5e223e074e Support localizing book title/description 2021-09-15 14:10:15 -07:00
Ruin0x11
96d9271d64 Specify language for book in command line args
- 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.
2021-09-15 14:00:10 -07:00