Home of the LanceDB documentation. Built using Mintlify.
Install the Mintlify CLI to preview the documentation changes locally. To install, use the following command
npm i -g mintlifyRun the following commands at the root of the documentation (/docs/ in this repo, where docs.json is located).
cd docs
mint devCheck broken links (applies to internal links within this docs site only):
mint broken-linksTo generate snippets, use uv to sync your local Python environment so that you can run the Python script described below.
uv syncThe Python, TypeScript and Rust code snippets used in the documentation are tested prior to use in the docs. These tests are located in the tests/ directory. Run the tests locally for each language
when building the docs locally.
MDX snippets are generated by running a separate script scripts/mdx_snippets_gen.py, as Mintlify cannot
scan the contents of raw code files -- it requires that the snippets are in MDX files under the
snippets directory.
A Makefile is provided with convience functions that run the snippet generation for each language:
# Generate snippets for each language, one by one
make py
make ts
make rs
# Or, generate them for all languages in one command
make snippetsThe generated snippets are placed in the appropriate file in /docs/snippets/ directory, making them
available for importing in the corresponding file.
The following sequence of steps are run:
- Run tests for py, ts, rs files that contain new code you added, and verify that the tests pass locally
- Generate MDX snippets via the
make snippetscommand - Import MDX snippets in the corresponding MDX docs page
- Include the MDX snippet as a parameter inside a
<CodeBlock>JSX component in Mintlify
Creating and using snippets for code blocks in the MDX files helps ensure that we are placing code that's been tested (per recent LanceDB releases) in the hands of users.
Note
As far as possible, do not add code snippets manually inside triple-backticks! Write the tests for
the required language in tests/* directory, then generate the snippets programmatically via the Makefile
commands.