book.toml

  1[book]
  2authors = ["The Zed Team"]
  3language = "en"
  4multilingual = false
  5src = "src"
  6title = "Zed"
  7site-url = "/docs/"
  8
  9[build]
 10extra-watch-dirs = ["../crates/docs_preprocessor"]
 11
 12# zed-html is a "custom" renderer that just wraps the
 13# builtin mdbook html renderer, and applies post-processing
 14# as post-processing is not possible with mdbook in the same way
 15# pre-processing is
 16# The config is passed directly to the html renderer, so all config
 17# options that apply to html apply to zed-html
 18[output.zed-html]
 19command = "cargo run -p docs_preprocessor -- postprocess"
 20# Set here instead of above as we only use it replace the `#description#` we set in the template
 21# when no front-matter is provided value
 22default-description = "Learn how to use and customize Zed, the fast, collaborative code editor. Official docs on features, configuration, AI tools, and workflows."
 23default-title = "Zed Code Editor Documentation"
 24no-section-label = true
 25preferred-dark-theme = "dark"
 26additional-css = ["theme/page-toc.css", "theme/plugins.css", "theme/highlight.css"]
 27additional-js  = ["theme/page-toc.js", "theme/plugins.js"]
 28
 29[output.zed-html.print]
 30enable = false
 31
 32# Redirects for `/docs` pages.
 33#
 34# All of the source URLs are interpreted relative to mdBook, so they must:
 35# 1. Not start with `/docs`
 36# 2. End in `.html`
 37#
 38# The destination URLs are interpreted relative to `https://zed.dev`.
 39# - Redirects to other docs pages should end in `.html`
 40# - You can link to pages on the Zed site by omitting the `/docs` in front of it.
 41[output.zed-html.redirect]
 42# AI
 43"/ai.html" = "/docs/ai/overview.html"
 44"/assistant-panel.html" = "/docs/ai/agent-panel.html"
 45"/assistant.html" = "/docs/assistant/assistant.html"
 46"/assistant/assistant-panel.html" = "/docs/ai/agent-panel.html"
 47"/assistant/assistant.html" = "/docs/ai/overview.html"
 48"/assistant/commands.html" = "/docs/ai/text-threads.html"
 49"/assistant/configuration.html" = "/docs/ai/configuration.html"
 50"/assistant/context-servers.html" = "/docs/ai/mcp.html"
 51"/assistant/contexts.html" = "/docs/ai/text-threads.html"
 52"/assistant/inline-assistant.html" = "/docs/ai/inline-assistant.html"
 53"/assistant/model-context-protocol.html" = "/docs/ai/mcp.html"
 54"/assistant/prompting.html" = "/docs/ai/rules.html"
 55"/language-model-integration.html" = "/docs/assistant/assistant.html"
 56"/model-improvement.html" = "/docs/ai/ai-improvement.html"
 57"/ai/temperature.html" = "/docs/ai/agent-settings.html#model-temperature"
 58
 59# Collaboration
 60"/channels.html" = "/docs/collaboration/channels.html"
 61"/collaboration.html" = "/docs/collaboration/overview.html"
 62
 63# Community
 64"/community/feedback.html" = "/community-links"
 65"/conversations.html" = "/community-links"
 66
 67# Debugger
 68"/debuggers.html" = "/docs/debugger.html"
 69
 70# MCP
 71"/assistant/model-context-protocolCitedby.html" = "/docs/ai/mcp.html"
 72"/context-servers.html" = "/docs/ai/mcp.html"
 73"/extensions/context-servers.html" = "/docs/extensions/mcp-extensions.html"
 74
 75# Languages
 76"/adding-new-languages.html" = "/docs/extensions/languages.html"
 77"/elixir.html" = "/docs/languages/elixir.html"
 78"/javascript.html" = "/docs/languages/javascript.html"
 79"/languages/languages/html.html" = "/docs/languages/html.html"
 80"/languages/languages/javascript.html" = "/docs/languages/javascript.html"
 81"/languages/languages/makefile.html" = "/docs/languages/makefile.html"
 82"/languages/languages/nim.html" = "/docs/languages/nim.html"
 83"/languages/languages/ruby.html" = "/docs/languages/ruby.html"
 84"/languages/languages/scala.html" = "/docs/languages/scala.html"
 85"/python.html" = "/docs/languages/python.html"
 86"/ruby.html" = "/docs/languages/ruby.html"
 87
 88# Zed development
 89"/contribute-to-zed.html" = "/docs/development.html#contributor-links"
 90"/contributing.html" = "/docs/development.html#contributor-links"
 91"/developing-zed.html" = "/docs/development.html"
 92"/development/development/linux.html" = "/docs/development/linux.html"
 93"/development/development/macos.html" = "/docs/development/macos.html"
 94"/development/development/windows.html" = "/docs/development/windows.html"
 95
 96# Our custom preprocessor for expanding commands like `{#kb action::ActionName}`,
 97# and other docs-related functions.
 98#
 99# Comment the below section out if you need to bypass the preprocessor for some reason.
100[preprocessor.zed_docs_preprocessor]
101command = "cargo run -p docs_preprocessor --"
102renderer = ["html"]