Skip to content

lancedb/docs

Repository files navigation

LanceDB Mintlify Documentation

Home of the LanceDB documentation. Built using Mintlify.

Development

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

Check broken links (applies to internal links within this docs site only):

mint broken-links

Generate snippets

To generate snippets, use uv to sync your local Python environment so that you can run the Python script described below.

uv sync

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 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 snippets

The 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:

  1. Run tests for py, ts, rs files that contain new code you added, and verify that the tests pass locally
  2. Generate MDX snippets via the make snippets command
  3. Import MDX snippets in the corresponding MDX docs page
  4. 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.

About

Documentation for LanceDB, a multimodal lakehouse for AI

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published