npm-packages/docs/README.md
This website is built using Docusaurus 2, a modern static website generator.
just rush install
npm run dev
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
This is a file that was manually generated using Firecrawl: https://www.firecrawl.dev/blog/How-to-Create-an-llms-txt-File-for-Any-Website
You need to get an API key from Firecrawl and follow the instructions on that blog post above.
I then did a few manual edits:
Otherwise it generated reasonably decent output. We should eventually make this more automated with every publish.
See here. For the full background.
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.
The Component docs are in the /docs folder of the Components that we keep in sync. For example, https://github.com/get-convex/component/tree/main/docs To update them, run the following command in this directory:
node scripts/pull-component-docs.js
This will pull the latest docs from the main branch and update the docs
directory, doing some replacing of relative links back to the original repo for
code snippets.
This is a manual process and generally only needs to be done when the component docs change and there is a new release of the component package.
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