Supersedes #5179 (which only bumped `mkdocs-material` to `9.7.7` in `docs/requirements.txt`) by upgrading `mkdocs-material` to `9.8.2` together with compatible `mkdocstrings` tooling across both the SDK Pages workflow and the Python `docs` extra, while retaining external type cross-references. ## Changes - **`docs/requirements.txt`** (used by `.github/workflows/docs.yml`): pin `mkdocs-material==9.8.2`, update `mkdocstrings[python]>=1.0.7,<2` and `mkdocs-autorefs>=1.4`, remove the legacy `griffe>=0.40,<1.0` constraint so the Python handler selects its compatible Griffe dependency, and declare `pymdown-extensions>=11.0.1` explicitly (also required by Material `9.8.2` and loaded directly by the site's Markdown extensions). - **`python/pyproject.toml` & `python/uv.lock`**: raise the `docs` extra floors to `mkdocs-material>=9.8.2` and `mkdocstrings[python]>=1.0.7,<2`. Only `mkdocs-material` (`9.7.6` -> `9.8.2`) and `mkdocstrings` (`1.0.4` -> `1.0.7`) change in `python/uv.lock` (lock revision 3 preserved; other extras unchanged). - **`docs/mkdocs.yml`**: switch the `mkdocstrings` Python handler key from `import` to `inventories` so external type links remain active with `mkdocstrings-python` 2.x, and update the Pydantic inventory URL to the canonical `https://pydantic.dev/docs/validation/latest/objects.inv`. ## Verification - **SDK Pages workflow path (CPython 3.11.18)**: ran both `pip install` steps from `.github/workflows/docs.yml` (resolving `mkdocs-material 9.8.2`, `mkdocstrings 1.0.8`, `mkdocstrings-python 2.0.11`, `mkdocs-autorefs 1.4.5`, `griffelib 2.4.1`, `pymdown-extensions 13.1.2`), verified `python -m pip check`, and ran `PYTHONPATH=. mkdocs build` from `docs/` (exit 0 in 9.65s). - **Rendered HTML and links check**: inspected `docs/site/python/python/index.html` (188 API directive headings, 1,881 rendered signatures, 2,121 highlighted blocks). Verified internal cross-references for representative sync/async APIs and indices (`lancedb.connect`, `lancedb.connect_async`, `lancedb.table.Table.search`, `lancedb.table.AsyncTable.search`, `lancedb.query.BooleanQuery`, `lancedb.schema.blob_array`, `lancedb.index.FTS`), rendering of `lancedb.rerankers.TypeSafeReranker`, and external inventory links in the generated HTML (193 Arrow links including `pyarrow.Table`, 40 Pydantic links including `pydantic.BaseModel`; all three configured inventories—Arrow, Pandas, and Pydantic—loaded cleanly). - **Locked Python `docs` extra (CPython 3.11.18)**: verified `uv lock --check --python 3.11` and built docs in a separate `uv sync --locked --no-install-project --extra docs` environment (`mkdocs-material 9.8.2`, `mkdocstrings 1.0.7`, `mkdocstrings-python 2.0.5`, `pymdown-extensions 11.0.1`) with the Swagger and redirects plugins added; `uv pip check`, `PYTHONPATH=. mkdocs build`, and the HTML API/external link checks passed (188 headings, 1,880 signatures, 2,120 highlighted blocks, 197 Arrow and 40 Pydantic external links). - **Warnings**: the build is not warning-free; both `mkdocs build` runs exit 0 with pre-existing `mkdocs_autorefs` warnings for duplicate TypeScript `list` anchors and several unresolved Python docstring cross-references (and `uv lock --check` still reports the pre-existing yanked-version warning for `charset-normalizer==3.4.8`).
LanceDB Documentation
For website guides in docs/web, start with
Documentation in CONTRIBUTING.md. That
covers editing pages, generated examples, previews, availability and drafts.
This page covers the SDK reference in docs/src, built with MkDocs. Its
GitHub Actions workflow builds and deploys on
pushes to main, so it can include unreleased APIs. That is separate from the
release editions of the Mintlify website.
Building the docs
Setup
- Install LanceDB Python. See setup in Python contributing guide.
Run
make developto install the Python package. - Install documentation dependencies. From LanceDB repo root:
pip install -r docs/requirements.txt
Preview the docs
Run these commands from the LanceDB repository root. The subshell changes into
docs to load mkdocs.yml, while leaving your shell in the repository root.
(cd docs && PYTHONPATH=. mkdocs serve)
If you want to just generate the HTML files:
(cd docs && PYTHONPATH=. mkdocs build)
If successful, you should see a docs/site directory in the repository root that
you can verify locally.
Adding examples
To make sure examples are correct, we put examples in test files so they can be run as part of our test suites.
You can see the tests are at:
- Python:
python/python/tests/docs - Typescript:
nodejs/examples/
Checking python examples
cd python
pytest -vv python/tests/docs
Checking typescript examples
The examples depend on @lancedb/lancedb at file:../dist, so the package must be
built before running the tests. This uses pnpm; see the
Typescript contributing guide for the toolchain setup.
pushd nodejs
pnpm install
pnpm build
popd
Then you can run the examples by going to the nodejs/examples directory, which is a
separate pnpm package with its own lockfile:
pushd nodejs/examples
pnpm install
pnpm test
popd
API documentation
Python
The Python API documentation is organized based on the file docs/src/python/python.md.
We manually add entries there so we can control the organization of the reference page.
However, this means any new types must be manually added to the file. No additional
steps are needed to generate the API documentation.
Typescript
The typescript API documentation is generated from the typescript source code using typedoc.
When new APIs are added, you must manually re-run the typedoc command to update the API documentation. The new files should be checked into the repository.
pushd nodejs
# `pnpm docs` would invoke pnpm's built-in `docs` command, not the script.
pnpm run docs
popd