Let `mdbook build` select renderer and preprocessors
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start with the mdbook build and mdbook serve command entry points and trace how renderers and preprocessors are selected from book.toml. Define command-line controls that enable or disable each for both commands, then verify that the normal workflow remains unchanged and that the translation workflow can activate them when needed.
Written by the indexing model from the issue text.
Description
I'm adding support for translations to https://github.com/google/comprehensive-rust/ — via the code I posted in #1864. My plan is to do this via a renderer and a preprocessor:
- a
mdbook-gettextrenderer collects the text from the entire book and outputs amessages.potfile which is ready to be translated - a
translatepreprocessor uses axx.pofile (with translations) to translate the text on-the-fly into an output language.
Hooking into mdbook like this seems nice: I don't need to know about where the Markdown files are on disk and I can reuse things such as BookItem.
However, I don't need the renderer and the preprocessor most of the time: I only need them when publishing a new version. It would therefore be nice if mdbook build would have new command line options which lets me enable/disable the renderer and preprocessor.
Does that sound like a reasonable idea? I think mdbook serve should have the same options.
My workaround right now is to modify the book.toml file to enable the renderer and preprocessor when needed.
- Dominant language
- Rust
- Stars
- 22.2k
- Forks
- 1.9k
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 12
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from rust-lang/mdBook
-
C-bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
C-enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
C-enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
C-enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
All issues in rust-lang/mdBook
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
kwakseongjae/auto-hwp#319 ·
-
area:cli bug filter-quality good first issue priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
bevyengine/bevy#25861 ·
-
comp-datalake
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/ClickHouse#121222 ·
-
enhancement remote
Difficulty 2/5 1-3 hours Newbie friendliness 68/100