This repository contains the documentation for LanceDB, a vector database for AI applications. The documentation is built using MkDocs and deployed to lancedb.github.io/documentation.
- Python 3.8 or higher
- Node.js and npm (for TypeScript examples)
- LanceDB Python package installed
-
Install LanceDB Python:
# From the LanceDB repository root cd python make develop
-
Install documentation dependencies:
pip install -r docs/requirements.txt
To preview the documentation locally with live reloading:
cd docs
mkdocs serve
The documentation will be available at http://127.0.0.1:8000/.
To generate static HTML files:
PYTHONPATH=. mkdocs build -f docs/mkdocs.yml
This will create a docs/site
directory with the built documentation, which you can open in a browser to verify locally.
- Clear and Concise: Write documentation that is easy to understand.
- Examples: Include practical examples where appropriate.
- Consistency: Follow the existing documentation style and structure.
- Correctness: Ensure all examples are tested and work correctly.
docs/src/
- Source markdown files for the documentationdocs/overrides/
- Custom template overrides for MkDocsdocs/test/
- Documentation tests
- Create or modify markdown files in the appropriate directory under
docs/src/
. - Add code examples in the relevant test directories to ensure they are verified by tests.
- Preview your changes locally using
mkdocs serve
. - Submit a pull request with your changes.
Examples in the documentation are maintained as executable test files to ensure they remain correct.
Python examples are located in python/python/tests/docs/
:
cd python
pytest -vv python/tests/docs
TypeScript examples are in nodejs/examples/
:
-
Build the LanceDB TypeScript package:
cd nodejs npm ci npm run build
-
Run the examples:
cd nodejs/examples npm ci npm test
Python API documentation is organized based on docs/src/python/python.md
. When adding new types or functions, they must be manually added to this file to appear in the reference documentation.
TypeScript API documentation is generated using typedoc. After adding new APIs, regenerate the documentation:
cd nodejs
npm run docs
The generated files should be committed to the repository.
The documentation is automatically built and deployed by GitHub Actions whenever a commit is pushed to the main
branch. This means the documentation may include unreleased features.
The documentation is licensed under the same license as LanceDB.