This powers the Convex Docs. This is an up-to-date export of the documentation. It may not build in the open source repo - since it was designed to run inside the Convex internal environment. Feel free to use and modify the docs. We'll fix the docs build process eventually.
This website is built using Docusaurus 2, a modern static website generator.
As mentioned in the "JavaScript packages" section in the top-level README.md
,
you'll need to use rush
to install dependencies. Don't run npm install
directly, run the following Rush command instead:
just rush install
just run-docs
This command starts a local dev server and opens up a browser window. Most changes are reflected live without having to restart the server.
If you make changes to the convex
NPM package and want to see them reflected
in API docs, run just rush build -t convex
and restart the server.
The command runs npm run dev
, which will not run all checks in our presubmits.
For example, broken links are not checked. To view all errors, try building and
testing:
npm run test
npm run build
To get AI chat working when running docs locally, you need to create
.env.local
file in this directory with a CONVEX_URL
environment variable:
CONVEX_URL="https://fantastic-otter-933.convex.cloud" # team: convex, project: ai-bot
Follow the README in npm-packages/convex-ai-chat
.
You can enable spell checking in VS Code by installing Code Spell Checker.
npm run build
This command generates static content into the build
directory and can be
served using any static contents hosting service.
See here.
See here.
Typedoc plugins don't seem to work in our monorepo with Rush: they only work when installed from npm.
We needed to update a couple, so we forked them at https://github.com/get-convex/typedoc-plugin-markdown
Iterating on typedoc plugins is rough, typedoc implements their own module resolution such that our rush/pnpm solution doesn't work. So to iterate I
- cloned our typedoc-plugin-markdown fork and set a globalOverride in rush/pnpm-config.json
- make changes there and did a build with yarn run build
- removed the dependency from dashboard's package.json
- just rush update
- re-added the dependency to dashboard's package.json
- just rush update
- repeat from 2.
- remove the globalOverridel, increment the typedoc-plugin-markdown version number and publish, and update docs package.json deps