restore material theme and add mkdocstring for autodoc etc

This commit is contained in:
Chang She
2023-03-22 17:45:51 -07:00
parent 242802ec74
commit aeb3c52c8c
5 changed files with 63 additions and 0 deletions

36
.github/workflows/docs.yml vendored Normal file
View File

@@ -0,0 +1,36 @@
name: Deploy docs to Pages
on:
push:
branches: ["main"]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Allow one concurrent deployment
concurrency:
group: "rtd"
cancel-in-progress: true
jobs:
# Single deploy job since we're just deploying
build:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: 'pip'
cache-dependency-path: "docs/requirements.txt"
- name: Build Python
working-directory: python
run: |
python -m pip install -e .
python -m pip install -r ../docs/requirements.txt
- name: Build docs
working-directory: docs
run: |
mkdoc build

View File

@@ -17,3 +17,4 @@ LanceDB's core is written in Rust 🦀 and is built using Lance, an open-source
## Documentation Quick Links
* `Quick start` - search and filter a hello world vector dataset with LanceDB using the Python SDK.
* [`API Reference`](python.md) - detailed documentation for the LanceDB Python SDK.

12
docs/python.md Normal file
View File

@@ -0,0 +1,12 @@
# LanceDB Python API Reference
## Installation
```shell
pip install lancedb
```
::: lancedb
::: lancedb.db
::: lancedb.table
::: lancedb.query

3
docs/requirements.txt Normal file
View File

@@ -0,0 +1,3 @@
mkdocs==1.4.2
mkdocs-material==9.1.3
mkdocstrings[python]==0.20.0

View File

@@ -1 +1,12 @@
site_name: LanceDB Documentation
theme:
name: "material"
plugins:
- search
- mkdocstrings
nav:
- Home: index.md
- Python API: python.md