Revert "Add docs_preprocessor crate to support Zed Docs" (#16880)

Temporarily revert #16700 to deal with this error:

`error: manifest path `../crates/docs_preprocessor/Cargo.toml` does not
exist` as it was causing the docs-preprocessor not to run, meaning
unexpanded templates were showing up in the public docs.

Reverts zed-industries/zed#16700

Release Notes:

- N/A
This commit is contained in:
Nate Butler 2024-08-26 11:06:25 -04:00 committed by GitHub
parent c658ad8380
commit 2a03dde538
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 24 additions and 639 deletions

View file

@ -10,13 +10,6 @@ To preview the docs locally you will need to install [mdBook](https://rust-lang.
mdbook serve docs
```
## Preprocessor
We have a custom mdbook preprocessor for interfacing with our crates (`crates/docs_preprocessor`).
If for some reason you need to bypass the docs preprocessor, you can comment out `[preprocessor.zed_docs_preprocessor]
` from the `book.toml`.:
## Images and videos
To add images or videos to the docs, upload them to another location (e.g., zed.dev, GitHub's asset storage) and then link out to them from the docs.
@ -32,32 +25,4 @@ Putting binary assets such as images in the Git repository will bloat the reposi
The table of contents files (`theme/page-toc.js` and `theme/page-doc.css`) were initially generated by [`mdbook-pagetoc`](https://crates.io/crates/mdbook-pagetoc).
Since all this preprocessor does does is generate the static assets, we don't need to keep it around once they have been generated.
## Referencing Keybindings and Actions
When referencing keybindings or actions, use the following formats:
### Keybindings:
`{#kb scope::Action}` - e.g., `{#kb zed::OpenSettings}`.
This will output a code element like: `<code>Cmd+,|Ctrl+,</code>`. We then use a client-side plugin to show the actual keybinding based on the user's platform.
By using the action name, we can ensure that the keybinding is always up-to-date rather than hardcoding the keybinding.
### Actions:
`{#action scope::Action}` - e.g., `{#action zed::OpenSettings}`.
This will render a human-readable version of the action name, e.g., "zed: open settings", and will allow us to implement things like additional context on hover, etc.
### Creating New Templates
New templates can be created by implementing the `Template` trait for your desired template in the `docs_preprocessor` crate.
### References
- Template Trait: crates/docs_preprocessor/src/templates.rs
- Example template: crates/docs_preprocessor/src/templates/keybinding.rs
- Client-side plugins: docs/theme/plugins.js
Since all these preprocessor does is generate the static assets, we don't need to keep it around once they have been generated.