1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2024-12-05 03:58:45 +02:00
comprehensive-rust/mdbook-course
dependabot[bot] c85816a01f
cargo: bump the patch group across 1 directory with 12 updates (#2489)
Bumps the patch group with 12 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [anyhow](https://github.com/dtolnay/anyhow) | `1.0.91` | `1.0.93` |
| [clap](https://github.com/clap-rs/clap) | `4.5.20` | `4.5.21` |
| [mdbook](https://github.com/rust-lang/mdBook) | `0.4.40` | `0.4.43` |
| [serde](https://github.com/serde-rs/serde) | `1.0.214` | `1.0.215` |
| [serde_json](https://github.com/serde-rs/json) | `1.0.132` | `1.0.133`
|
| [csv](https://github.com/BurntSushi/rust-csv) | `1.3.0` | `1.3.1` |
| [tokio](https://github.com/tokio-rs/tokio) | `1.41.0` | `1.41.1` |
| [url](https://github.com/servo/rust-url) | `2.5.2` | `2.5.4` |
| [mockall](https://github.com/asomers/mockall) | `0.13.0` | `0.13.1` |
| [zerocopy](https://github.com/google/zerocopy) | `0.8.8` | `0.8.11` |
| [cxx](https://github.com/dtolnay/cxx) | `1.0.129` | `1.0.133` |
| [cxx-build](https://github.com/dtolnay/cxx) | `1.0.129` | `1.0.133` |

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-01 21:05:18 +00:00
..
src Apply clippy::semicolon_if_nothing_returned (#2410) 2024-10-21 19:57:01 +02:00
Cargo.toml cargo: bump the patch group across 1 directory with 12 updates (#2489) 2024-12-01 21:05:18 +00:00
README.md Add a 'course-content' binary (#1757) 2024-01-25 09:47:23 -05:00

mdbook-course

This is an mdBook preprocessor to handle some specific details of Comprehensive Rust.

It provides three binaries:

  • mdbook-course -- the actual preprocessor
  • course-schedule -- prints the course schedule with timings
  • course-content -- dumps all course content to stdout, in order

Frontmatter

The preprocessor parses "frontmatter" -- YAML between --- at the beginning of a Markdown file -- and removes it from the rendered result.

Frontmatter is optional, and can contain any of the following fields, defined below:

minutes: NNN
target_minutes: NNN
course: COURSE NAME
session: SESSION NAME

Course Structure

A book can contain multiple courses. Each course is made up of sessions, which are blocks of instructional time (and include breaks). Typically two sessions are taught per day, morning and afternoon.

Each session is comprised of segments, which are slides on a related theme. Breaks are scheduled between segments.

Each segment is comprised of slides. A slide can be made up of one or more mdBook chapters.

The course structure is derived from the mdBook structure. Each top-level mdBook "section" is treated as a segment, and may optionally begin a new session or course. Within each section, the first chapter and subsequent second-level chapters are each treated as a slide. Any further-nested chapters are treated as parts of the parent slide. For example:

- [Frobnication](frobnication.md)
  - [Integer Frobnication](frobnication/integers.md)
  - [Frob Expansion](frobnication/expansion.md)
    - [Structs](frobnication/expansion-structs.md)
    - [Enums](frobnication/expansion-structs.md)
  - [Exercise](frobnication/exercise.md)
    - [Solution](frobnication/Solution.md)

In this segment, there are four slides: "Frobnication", "Integer Frobnication", "Frob Expansion", and "Exercise". The last two slides are made up of multiple chapters.

The first chapter of a segment can use the course and session fields in its frontmatter to indicate that it is the first segment in a session or course.

Timing

Each chapter should specify an estimate of the instructional time it will require in the minutes field. This information is summed, with breaks automatically added between segments, to give time estimates for segments, sessions, and courses.

Each session should list a target_minutes that is the target duration of the session.

Directives

Within the course material, the following directives can be used:

{{%segment outline}}
{{%session outline}}
{{%course outline}}
{{%course outline COURSENAME}}

These will be replaced with a markdown outline of the current segment, session, or course. The last directive can refer to another course by name and is used in the "Running the Course" section.

Course-Schedule Comments

The course-schedule binary generates Markdown output that is included in a GitHub pull request comment, based on the information provided in the above format.