Home of the new LanceDB documentation on Mintlify.
Install the Mintlify CLI to preview the documentation changes locally. To install, use the following command
npm i -g mintlify Run the following commands at the root of the documentation (/docs/ in this repo, where docs.json is located).
cd docs mint dev The Python, TypeScript and Rust code snippets used in the documentation are tested prior to use in the docs. These tests are located in the examples/ 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 following sequence of steps are run:
- Run tests for py, ts, rs files to verify that the code works
- Generate MDX snippets
- Import MDX snippets in the corresponding documentation page
- Add the NDX snippet inside a
<CodeBlock>component in Mintlify
This ensures that the code in the docs is in line with the latest LanceDB API
Note
Do not add code snippets manually inside triple-backticks! Write the tests to the examples directory, then generate the snippets programmatically via the Makefile commands. This helps ensure that the documentation shows code that was actually run by a human, and by CI.