mirror of
https://github.com/edera-dev/sprout.git
synced 2026-11-04 15:42:20 +00:00
docs(config): move CONFIG.md to docs/config.md (#120)
Keeps the configuration reference next to the setup guides. Updates the README, CLAUDE.md, the doc comment in crates/config and the update-config-docs skill to match.
This commit is contained in:
5 files changed
+14
-14
No files matched your search
@@ -1,12 +1,12 @@
|
|||||||
---
|
---
|
||||||
name: update-config-docs
|
name: update-config-docs
|
||||||
description: Bring CONFIG.md back in line with the code. Use after changing anything in crates/config, the command line options, loader.conf handling, strict mode, or autoconfiguration, or when asked to check that CONFIG.md is accurate.
|
description: Bring docs/config.md back in line with the code. Use after changing anything in crates/config, the command line options, loader.conf handling, strict mode, or autoconfiguration, or when asked to check that docs/config.md is accurate.
|
||||||
---
|
---
|
||||||
|
|
||||||
# Update CONFIG.md
|
# Update docs/config.md
|
||||||
|
|
||||||
`CONFIG.md` is the reference for `sprout.toml`, the command line options, BLS support and strict mode.
|
`docs/config.md` is the reference for `sprout.toml`, the command line options, BLS support and strict mode.
|
||||||
The README only links to it, so a setting that is missing from CONFIG.md is undocumented.
|
The README only links to it, so a setting that is missing from docs/config.md is undocumented.
|
||||||
|
|
||||||
## 1. Find what changed
|
## 1. Find what changed
|
||||||
|
|
||||||
@@ -16,7 +16,7 @@ Start from the diff, or from the whole config surface if there is none:
|
|||||||
git diff main -- crates/config crates/boot/src/options.rs crates/boot/src/config crates/boot/src/autoconfigure crates/bls
|
git diff main -- crates/config crates/boot/src/options.rs crates/boot/src/config crates/boot/src/autoconfigure crates/bls
|
||||||
```
|
```
|
||||||
|
|
||||||
The sources of truth, and the section of CONFIG.md each one feeds:
|
The sources of truth, and the section of docs/config.md each one feeds:
|
||||||
|
|
||||||
| Source | Section |
|
| Source | Section |
|
||||||
|-----------------------------------------------------------|-------------------------------------------|
|
|-----------------------------------------------------------|-------------------------------------------|
|
||||||
@@ -34,7 +34,7 @@ The sources of truth, and the section of CONFIG.md each one feeds:
|
|||||||
|
|
||||||
## 2. Check each key
|
## 2. Check each key
|
||||||
|
|
||||||
For every struct field in `crates/config`, CONFIG.md needs its TOML name (look at `#[serde(rename)]`, as
|
For every struct field in `crates/config`, docs/config.md needs its TOML name (look at `#[serde(rename)]`, as
|
||||||
most multi-word keys use dashes), its type, its default, and what it does. Read the code that uses it in
|
most multi-word keys use dashes), its type, its default, and what it does. Read the code that uses it in
|
||||||
`crates/boot`, not only the doc comment, because the behavior is what the reader depends on.
|
`crates/boot`, not only the doc comment, because the behavior is what the reader depends on.
|
||||||
|
|
||||||
@@ -56,7 +56,7 @@ implements it.
|
|||||||
- Keep each section's shape: a short explanation, a TOML example, then a table of keys.
|
- Keep each section's shape: a short explanation, a TOML example, then a table of keys.
|
||||||
- Examples must parse. Check that every key in one exists and is spelled the way serde expects.
|
- Examples must parse. Check that every key in one exists and is spelled the way serde expects.
|
||||||
- Update the table of contents if you add or rename a heading.
|
- Update the table of contents if you add or rename a heading.
|
||||||
- Keep README.md short. It gets the feature list and the minimal examples, and CONFIG.md gets everything else.
|
- Keep README.md short. It gets the feature list and the minimal examples, and docs/config.md gets everything else.
|
||||||
- Don't duplicate the strict mode table or the default entry order anywhere else.
|
- Don't duplicate the strict mode table or the default entry order anywhere else.
|
||||||
|
|
||||||
## 4. Write like a person
|
## 4. Write like a person
|
||||||
@@ -79,5 +79,5 @@ cargo build --target aarch64-unknown-uefi
|
|||||||
cargo fmt --all --check
|
cargo fmt --all --check
|
||||||
```
|
```
|
||||||
|
|
||||||
Then re-read the diff of CONFIG.md against the code once more for any key whose name or default you
|
Then re-read the diff of docs/config.md against the code once more for any key whose name or default you
|
||||||
touched. If the change was only to docs, skip the builds.
|
touched. If the change was only to docs, skip the builds.
|
||||||
@@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
Sprout is a programmable UEFI bootloader written in Rust, for `x86_64` and `aarch64`. It is a `no_std` workspace
|
Sprout is a programmable UEFI bootloader written in Rust, for `x86_64` and `aarch64`. It is a `no_std` workspace
|
||||||
built for the `*-unknown-uefi` targets, so it cannot be run or tested like a normal binary.
|
built for the `*-unknown-uefi` targets, so it cannot be run or tested like a normal binary.
|
||||||
See [README.md](README.md) for features and [CONFIG.md](CONFIG.md) for the configuration format.
|
See [README.md](README.md) for features and [docs/config.md](docs/config.md) for the configuration format.
|
||||||
After changing configuration, run the `update-config-docs` skill to keep CONFIG.md accurate.
|
After changing configuration, run the `update-config-docs` skill to keep docs/config.md accurate.
|
||||||
|
|
||||||
## Layout
|
## Layout
|
||||||
|
|
||||||
|
|||||||
@@ -149,10 +149,10 @@ autoconfigure = true
|
|||||||
```
|
```
|
||||||
|
|
||||||
The full list of settings, the command line options, generators, and how Sprout treats BLS entries,
|
The full list of settings, the command line options, generators, and how Sprout treats BLS entries,
|
||||||
`loader.conf` and strict mode are in [CONFIG.md](./CONFIG.md).
|
`loader.conf` and strict mode are in [the configuration reference](./docs/config.md).
|
||||||
|
|
||||||
[Edera]: https://edera.dev
|
[Edera]: https://edera.dev
|
||||||
[Configuration Reference]: ./CONFIG.md
|
[Configuration Reference]: ./docs/config.md
|
||||||
[Development Guide]: ./DEVELOPMENT.md
|
[Development Guide]: ./DEVELOPMENT.md
|
||||||
[Contributing Guide]: ./CONTRIBUTING.md
|
[Contributing Guide]: ./CONTRIBUTING.md
|
||||||
[Sprout License]: ./LICENSE
|
[Sprout License]: ./LICENSE
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ pub struct OptionsConfiguration {
|
|||||||
/// Makes Sprout follow the Boot Loader Specification and systemd-boot exactly where it
|
/// Makes Sprout follow the Boot Loader Specification and systemd-boot exactly where it
|
||||||
/// otherwise differs for convenience or safety. For example, the extended boot loader
|
/// otherwise differs for convenience or safety. For example, the extended boot loader
|
||||||
/// partition is always read, a one-shot entry only sets the default entry, and entries with
|
/// partition is always read, a one-shot entry only sets the default entry, and entries with
|
||||||
/// missing files are hidden. See CONFIG.md for everything it changes.
|
/// missing files are hidden. See docs/config.md for everything it changes.
|
||||||
#[serde(rename = "bls-strict-mode", default)]
|
#[serde(rename = "bls-strict-mode", default)]
|
||||||
pub bls_strict_mode: bool,
|
pub bls_strict_mode: bool,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Sprout reads a TOML file, `\sprout.toml`, from the root of the EFI partition it was loaded from. This page
|
Sprout reads a TOML file, `\sprout.toml`, from the root of the EFI partition it was loaded from. This page
|
||||||
covers everything that file can hold, the command line options that override it, and the BLS behavior that
|
covers everything that file can hold, the command line options that override it, and the BLS behavior that
|
||||||
sits next to it. For installing Sprout, see the [setup guides](./docs/setup).
|
sits next to it. For installing Sprout, see the [setup guides](./setup).
|
||||||
|
|
||||||
- [Command line options](#command-line-options)
|
- [Command line options](#command-line-options)
|
||||||
- [The file at a glance](#the-file-at-a-glance)
|
- [The file at a glance](#the-file-at-a-glance)
|
||||||
Reference in new issue
Block a user