Files
Peter Tripp 9e3e1647e1 Vendor highlight.js and add scheme language support to /docs.
- Ran: `node tools/build.js :common scheme`
- Upgrade from: `Highlight.js v10.1.1 (93fd0d73)` (June 2020)
- Upgraded to : `Highlight.js v11.10.0 (263980c628)` (August 2024)
2024-08-08 16:21:40 -04:00
..
2024-08-08 16:50:10 +02:00

Zed Docs

Welcome to Zed's documentation.

This is built on push to main and published automatically to https://zed.dev/docs.

To preview the docs locally you will need to install mdBook, and then run:

mdbook serve docs

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.

Putting binary assets such as images in the Git repository will bloat the repository size over time.

Internal notes:

  • We have a Cloudflare router called docs-proxy that intercepts requests to zed.dev/docs and forwards them to the "docs" Cloudflare Pages project.
  • CI uploads a new version to the Pages project from .github/workflows/deploy_docs.yml on every push to main.

Table of Contents

The table of contents files (theme/page-toc.js and theme/page-doc.css) were initially generated by mdbook-pagetoc.

Since all these preprocessor does is generate the static assets, we don't need to keep it around once they have been generated.

Highlight.js

mdBook by default uses Highlight.js with a custom theme for syntax highlighting with automatic language detection turned off for a list subset of common supported languages.

We've updated with a highlight.js that supports additional languages (scheme). To regenerate highlight.js run the following:

git clone https://github.com/highlightjs/highlight.js
cd highlight.js
git checkout 10-stable
node tools/build.js :common scheme

ZED_FOLDER=~/code/zed
cp build/highlight.min.js $ZED_FOLDER/docs/theme/highlight.js

Be sure to edit the code block above to include the any added languages (after scheme).