rust-lang / rust-lang/rust-by-example
Render RBE to PDF with `mdbook-pandoc`
Nobody has claimed this yet.
- Dominant language
- Handlebars
- Stars
- 8.1k
- Forks
- 1.6k
- PR merge metrics
- No merged PRs in 30d
Description
Hey there,
@max-heller was a great help to comprehensive-rust and rust-patterns as they helped us set up rendering to PDF. I found these issues: https://github.com/rust-lang/rust-by-example/issues?q=is%3Aissue+pdf+is%3Aclosed stating that we should open another one with new information, when they come available. So here we are.
mdbook-pandoc has some pre-rendered examples in also of Rust-by-example and the book: https://github.com/max-heller/mdbook-pandoc?tab=readme-ov-file#rendered-books
-
Comprehensive Rust: https://google.github.io/comprehensive-rust/comprehensive-rust.pdf
-
Rust Design Patterns: https://rust-unofficial.github.io/patterns/rust-design-patterns.pdf
(At this point, I think it makes sense to write up a condensed tutorial how to add PDF support to an existing mdbook...)
Some Resources
-
Initial support PR: https://github.com/rust-unofficial/patterns/pull/394
-
Adding download icon to menu bar: https://github.com/rust-unofficial/patterns/commit/d96de404c45f17310c3eb77b4669d715ce923d33
-
Line wrapping in code blocks: https://github.com/rust-unofficial/patterns/commit/3dd157b9d751e2a5a391b2933ae6eb8467ea1eaf
-
Readme of
mdbook-pandoc: https://github.com/max-heller/mdbook-pandoc?tab=readme-ov-file#getting-started
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.
Research direction
Start with the mdbook-pandoc README's getting-started section and compare the referenced Rust Design Patterns support PR and commits. Determine how Rust by Example should be rendered and how the PDF should be exposed, then verify that the generated book and download entry work as intended.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- build-system, documentation
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100