From d1e84f9d0acca392ebbd0e3a331dc3091fc9906e Mon Sep 17 00:00:00 2001 From: "Joseph T. Lyons" Date: Fri, 3 Apr 2026 13:48:13 -0400 Subject: [PATCH] Document generate-action-metadata step for local docs preview (#53038) I needed to run the docs locally and ran into this error when following the [docs README.md](https://github.com/zed-industries/zed/blob/main/docs/README.md). ``` Error: Found 27 errors in docs 2026-04-01 10:15:39 [ERROR] (mdbook::utils): Error: The "zed_docs_preprocessor" preprocessor exited unsuccessfully with exit status: 1 status ``` It turns out I needed to run `script/generate-action-metadata` first. This PR adds that step to the doc. Self-Review Checklist: - [X] I've reviewed my own diff for quality, security, and reliability - [X] Unsafe blocks (if any) have justifying comments - [X] The content is consistent with the [UI/UX checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) - [X] Tests cover the new/changed behavior - [X] Performance impact has been considered and is acceptable Closes #ISSUE Release Notes: - N/A --- docs/README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/README.md b/docs/README.md index f03f008223ba1102585c34f3b98bf93a985c1284..38be153de34b7e32e410fa67710297cca653d699 100644 --- a/docs/README.md +++ b/docs/README.md @@ -4,12 +4,15 @@ Welcome to Zed's documentation. This is built on push to `main` and published automatically to [https://zed.dev/docs](https://zed.dev/docs). -To preview the docs locally you will need to install [mdBook](https://rust-lang.github.io/mdBook/) (`cargo install mdbook@0.4.40`) and then run: +To preview the docs locally you will need to install [mdBook](https://rust-lang.github.io/mdBook/) (`cargo install mdbook@0.4.40`), generate the action metadata, and then serve: ```sh +script/generate-action-metadata mdbook serve docs ``` +The first command dumps an action manifest to `crates/docs_preprocessor/actions.json`. Without it, the preprocessor cannot validate keybinding and action references in the docs and will report errors. You only need to re-run it when actions change. + It's important to note the version number above. For an unknown reason, as of 2025-04-23, running 0.4.48 will cause odd URL behavior that breaks things. Before committing, verify that the docs are formatted in the way Prettier expects with: