Skip to content

Comments

docs: Generate configuration docs from settings.toml in-build#461

Merged
jdx merged 8 commits intojdx:mainfrom
thejcannon:jcannon/gen-docs-from-settings
Nov 26, 2025
Merged

docs: Generate configuration docs from settings.toml in-build#461
jdx merged 8 commits intojdx:mainfrom
thejcannon:jcannon/gen-docs-from-settings

Conversation

@thejcannon
Copy link
Contributor

@thejcannon thejcannon commented Nov 22, 2025

This change:

  • Moves the docs generation from build to bin
  • Makes it a prereq for docs task

If you think this is a step in the right direction, I'd love to also move the CLI docs to be generated (and so some more docs-gen)

I have a PoC/WIP of generating the rest of the configuration.md docs from Config.pkl here (also planning on doing the builtins)

Alternatives

I first tried to use a "data loader" to load the TOML and Vue templates to render the data. That worked until it was time to render the doc string. You can't have it render Markdown, since Vue is later in the pipeline than Markdown. Womp Womp.


Note

Generates docs/gen/settings-config.md from settings.toml using a new Rust bin, includes it in configuration.md, and wires the generator into docs tasks and CI.

  • Docs generation:
    • Add new bin generate-docs (bin/generate_docs.rs) to produce docs/gen/settings-config.md from settings.toml using shared types in build/settings_toml.rs.
    • Replace large inline section in docs/configuration.md with <!--@include: ./gen/settings-config.md-->.
    • Update docs/.gitignore to ignore gen/.
    • Update mise.toml tasks: add docs:gen (runs cargo run --bin generate-docs) and make docs/docs:build depend on it.
  • Build script refactor:
    • Extract settings TOML types to build/settings_toml.rs; update build/mod.rs to expose it.
    • Simplify build/generate_settings.rs to import shared types and remove in-build docs generation.
  • CI (Docs workflow):
    • Trigger on settings.toml changes; add Swatinem/rust-cache.
    • Build via mise run docs:build; adjust .nojekyll path to docs/.vitepress/dist/.nojekyll.

Written by Cursor Bugbot for commit f53d2a2. This will update automatically on new commits. Configure here.

@thejcannon thejcannon force-pushed the jcannon/gen-docs-from-settings branch from 2612a79 to d7e43c9 Compare November 23, 2025 02:10
@thejcannon thejcannon marked this pull request as ready for review November 23, 2025 02:33
@jdx
Copy link
Owner

jdx commented Nov 25, 2025

Bugbot run

@thejcannon
Copy link
Contributor Author

Excuse me, Bugbot, the man said "run"

@jdx
Copy link
Owner

jdx commented Nov 25, 2025

Screenshot 2025-11-25 at 09 13 40

not sure what I did wrong

@jdx
Copy link
Owner

jdx commented Nov 25, 2025

bugbot run

@jdx
Copy link
Owner

jdx commented Nov 25, 2025

I also think this probably needs some logic for the github action to work right once it's merged to deploy the docs changes

@thejcannon
Copy link
Contributor Author

thejcannon commented Nov 25, 2025

Screenshot 2025-11-25 at 09 13 40

not sure what I did wrong

Whoops. Bugbot caught the bug. Missing fs::create_dir(_all).

Just fixed it (and tested with rm -rf docs/gen && mise run docs

@jdx
Copy link
Owner

jdx commented Nov 26, 2025

bugbot run

@jdx
Copy link
Owner

jdx commented Nov 26, 2025

bugbot run

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no bugs!


@jdx jdx merged commit 15dc620 into jdx:main Nov 26, 2025
15 checks passed
@thejcannon thejcannon deleted the jcannon/gen-docs-from-settings branch November 26, 2025 03:04
@thejcannon
Copy link
Contributor Author

Damn, broke the docs build. Was hoping to avoid the submodules. One sec...

@jdx jdx mentioned this pull request Nov 26, 2025
@thejcannon
Copy link
Contributor Author

fixing here: #471

jdx added a commit that referenced this pull request Dec 4, 2025
## [1.26.0](https://github.com/jdx/hk/compare/v1.25.0..v1.26.0) -
2025-12-04

### 🚀 Features

- Split `taplo` into `taplo` and `taplo_format` by
[@thejcannon](https://github.com/thejcannon) in
[#466](#466)
- add pkl_format builtin for pkl 0.30 formatter by
[@jdx](https://github.com/jdx) in
[#475](#475)
- add check-conventional-commit utility and built-in by
[@joonas](https://github.com/joonas) in
[#477](#477)
- add mise builtin by [@hisaac](https://github.com/hisaac) in
[#480](#480)
- forward HTTP proxy env vars to pkl by [@jdx](https://github.com/jdx)
in [#486](#486)

### 🐛 Bug Fixes

- Fix docs build GHA by [@thejcannon](https://github.com/thejcannon) in
[#471](#471)
- improve progress bar accuracy for skipped steps and OSC alignment by
[@jdx](https://github.com/jdx) in
[#472](#472)
- cleaner error output for command failures by
[@jdx](https://github.com/jdx) in
[#474](#474)
- update mise builtin glob by [@hisaac](https://github.com/hisaac) in
[#482](#482)

### 🚜 Refactor

- Remove pointless stage test by
[@thejcannon](https://github.com/thejcannon) in
[#484](#484)
- Move `black` from mise config to tool stub, for testing, and test the
builtin by [@thejcannon](https://github.com/thejcannon) in
[#483](#483)
- Move category/description to annotation by
[@thejcannon](https://github.com/thejcannon) in
[#485](#485)

### 📚 Documentation

- Generate `configuration` docs from `settings.toml` in-build by
[@thejcannon](https://github.com/thejcannon) in
[#461](#461)
- generate builtins docs from Pkl instead of manual sync by
[@jdx](https://github.com/jdx) in
[#476](#476)

### 🧪 Testing

- Stub ktlint and add tests to builtin by
[@thejcannon](https://github.com/thejcannon) in
[#488](#488)
- Bump pkl, fix the builtin, and add tests by
[@thejcannon](https://github.com/thejcannon) in
[#489](#489)

### 🔍 Other Changes

- updated mise lockfile by [@jdx](https://github.com/jdx) in
[b10d2e6](b10d2e6)

### 📦️ Dependency Updates

- update jdx/mise-action digest to 146a281 by
[@renovate[bot]](https://github.com/renovate[bot]) in
[#479](#479)
- update anthropics/claude-code-action digest to a7e4c51 by
[@renovate[bot]](https://github.com/renovate[bot]) in
[#478](#478)
- lock file maintenance by
[@renovate[bot]](https://github.com/renovate[bot]) in
[#481](#481)

### New Contributors

- @hisaac made their first contribution in
[#482](#482)

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> Release v1.26.0 with a new `util check-conventional-commit` command,
proxy-forwarding to Pkl, updated docs, and dependency bumps.
> 
> - **Release/Versioning**:
> - Bump crate and CLI to `1.26.0`; update all Pkl URLs in
examples/templates/docs to `v1.26.0`.
> - **CLI/Features**:
> - Add `hk util check-conventional-commit` (with `--allowed-types`);
expose in usage, KDL spec, commands.json, and docs.
> - Add default values to flags in CLI spec/docs (e.g., `config dump
--format=json`, migrate defaults, `util --maxkb=500`).
> - **Core**:
> - Forward HTTP proxy env vars (`http_proxy`, `https_proxy`,
`no_proxy`) to Pkl via `--http-proxy/--http-no-proxy` during config
parsing.
> - **Docs**:
> - Regenerate CLI docs (add generated headers) and index; add page for
the new util; refresh examples.
>   - Update CHANGELOG with 1.26.0 entries.
> - **Dependencies/Build**:
> - Update Cargo.lock (multiple crate version bumps; unify `thiserror`
dependency usage).
>   - Update `mise.lock` entries/checksums.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
2da0194. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

Co-authored-by: mise-en-dev <[email protected]>
tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request Dec 12, 2025
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [hk](https://github.com/jdx/hk) | minor | `1.25.0` -> `1.26.0` |

MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot).

**Proposed changes to behavior should be submitted there as MRs.**

---

### Release Notes

<details>
<summary>jdx/hk (hk)</summary>

### [`v1.26.0`](https://github.com/jdx/hk/blob/HEAD/CHANGELOG.md#1260---2025-12-04)

[Compare Source](jdx/hk@v1.25.0...v1.26.0)

##### 🚀 Features

- Split `taplo` into `taplo` and `taplo_format` by [@&#8203;thejcannon](https://github.com/thejcannon) in [#&#8203;466](jdx/hk#466)
- add pkl\_format builtin for pkl 0.30 formatter by [@&#8203;jdx](https://github.com/jdx) in [#&#8203;475](jdx/hk#475)
- add check-conventional-commit utility and built-in by [@&#8203;joonas](https://github.com/joonas) in [#&#8203;477](jdx/hk#477)
- add mise builtin by [@&#8203;hisaac](https://github.com/hisaac) in [#&#8203;480](jdx/hk#480)
- forward HTTP proxy env vars to pkl by [@&#8203;jdx](https://github.com/jdx) in [#&#8203;486](jdx/hk#486)

##### 🐛 Bug Fixes

- Fix docs build GHA by [@&#8203;thejcannon](https://github.com/thejcannon) in [#&#8203;471](jdx/hk#471)
- improve progress bar accuracy for skipped steps and OSC alignment by [@&#8203;jdx](https://github.com/jdx) in [#&#8203;472](jdx/hk#472)
- cleaner error output for command failures by [@&#8203;jdx](https://github.com/jdx) in [#&#8203;474](jdx/hk#474)
- update mise builtin glob by [@&#8203;hisaac](https://github.com/hisaac) in [#&#8203;482](jdx/hk#482)

##### 🚜 Refactor

- Remove pointless stage test by [@&#8203;thejcannon](https://github.com/thejcannon) in [#&#8203;484](jdx/hk#484)
- Move `black` from mise config to tool stub, for testing, and test the builtin by [@&#8203;thejcannon](https://github.com/thejcannon) in [#&#8203;483](jdx/hk#483)
- Move category/description to annotation by [@&#8203;thejcannon](https://github.com/thejcannon) in [#&#8203;485](jdx/hk#485)

##### 📚 Documentation

- Generate `configuration` docs from `settings.toml` in-build by [@&#8203;thejcannon](https://github.com/thejcannon) in [#&#8203;461](jdx/hk#461)
- generate builtins docs from Pkl instead of manual sync by [@&#8203;jdx](https://github.com/jdx) in [#&#8203;476](jdx/hk#476)

##### 🧪 Testing

- Stub ktlint and add tests to builtin by [@&#8203;thejcannon](https://github.com/thejcannon) in [#&#8203;488](jdx/hk#488)
- Bump pkl, fix the builtin, and add tests by [@&#8203;thejcannon](https://github.com/thejcannon) in [#&#8203;489](jdx/hk#489)

##### 🔍 Other Changes

- updated mise lockfile by [@&#8203;jdx](https://github.com/jdx) in [b10d2e6](jdx/hk@b10d2e6)

##### 📦️ Dependency Updates

- update jdx/mise-action digest to [`146a281`](jdx/hk@146a281) by [@&#8203;renovate\[bot\]](https://github.com/renovate\[bot]) in [#&#8203;479](jdx/hk#479)
- update anthropics/claude-code-action digest to [`a7e4c51`](jdx/hk@a7e4c51) by [@&#8203;renovate\[bot\]](https://github.com/renovate\[bot]) in [#&#8203;478](jdx/hk#478)
- lock file maintenance by [@&#8203;renovate\[bot\]](https://github.com/renovate\[bot]) in [#&#8203;481](jdx/hk#481)

##### New Contributors

- [@&#8203;hisaac](https://github.com/hisaac) made their first contribution in [#&#8203;482](jdx/hk#482)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi40Ny4wIiwidXBkYXRlZEluVmVyIjoiNDIuNDcuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiUmVub3ZhdGUgQm90Il19-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants