|
| 1 | +# Mdbook Plugin |
| 2 | + |
| 3 | +The mdbook is controlled by the `mdbook-goals` plugin in this repo. |
| 4 | +This plugin makes various edits to the source: |
| 5 | + |
| 6 | +* Linking usernames like `@foo` to their github page and replacing them with their display name. |
| 7 | +* Linking GH references lke rust-lang/rust#123. |
| 8 | +* Collating goals, creating tables, etc. |
| 9 | + |
| 10 | +The plugin can also be used [from the commmand line](./commands.md). |
| 11 | + |
| 12 | +## Expected book structure |
| 13 | + |
| 14 | +The plugin is designed for the book to have a directory per phase of the goal program, e.g., `src/2024h2`, `src/2025h1`, etc. |
| 15 | +Within this directory there should be: |
| 16 | + |
| 17 | +* A `README.md` file that will contain the draft slate RFC. |
| 18 | +* One file per goal. Each goal file must follow the [TEMPLATE](../TEMPLATE.md) structure and in particular must have |
| 19 | + * a metadata table in its first section |
| 20 | + * a [Summary section](../TEMPLATE.md#summary) |
| 21 | + * a [Ownership and team asks](../TEMPLATE.md#ownership-and-team-asks) containing the subgoal table |
| 22 | +* One file per "phase" of the program, e.g., `proposed.md` etc. (These are not mandatory.) |
| 23 | + |
| 24 | +## Plugin replacement text |
| 25 | + |
| 26 | +The plugin will replace the following placeholder texts. |
| 27 | +Each placeholder is enclosed within an html comment `<!-- -->`. |
| 28 | + |
| 29 | +### Goal count |
| 30 | + |
| 31 | +The placeholder `<!-- #GOALS -->` will be replaced with the total number of goals under consideration |
| 32 | +(this count excludes goals with the status `Not accepted`). |
| 33 | + |
| 34 | +### Goal listing |
| 35 | + |
| 36 | +The placeholder `<!-- GOALS '$Status' -->` will insert a goal table listing goals of the given status `$Status`, e.g.: |
| 37 | + |
| 38 | +``` |
| 39 | +<!-- GOALS 'Flagship' --> |
| 40 | +<!-- GOALS 'Proposed' --> |
| 41 | +``` |
| 42 | + |
| 43 | +You can also list multiple status items, e.g.: |
| 44 | + |
| 45 | +``` |
| 46 | +<!-- GOALS 'Accepted,Orphaned' --> |
| 47 | +``` |
0 commit comments