Skip to content

Commit 7db408b

Browse files
authored
docs: migrate to MkDocs Material, apply Redis branding, restore Diataxis README (#28)
* Migrate documentation from Sphinx to MkDocs Material - Replace Sphinx + sphinx-book-theme with MkDocs + Material theme - Use mkdocstrings to auto-generate API reference from Google-style docstrings - Auto-generate llms.txt and llms-full.txt via mkdocs-llmstxt plugin - Convert MyST admonitions and {doc} cross-refs to Material syntax and relative links - Convert sphinx-design grid cards to Material grid cards on landing pages - Move Redis AI Hub header CSS/JS to docs/stylesheets and docs/javascripts - Update pyproject.toml docs group, Makefile targets, and .readthedocs.yaml - Remove docs/conf.py, docs/Makefile, docs/llms.txt (now auto-generated), docs/SPEC.md - Add site/ to .gitignore * docs: apply Redis branding, drop AI Hub header, restore Diataxis README Branding: - Switch Material primary/accent to the official Redis red (#FF4438) via `docs/stylesheets/redis-brand.css` overriding `--md-primary-fg-color` and `--md-accent-fg-color`. - Adopt the Redis font pair: Space Grotesk (body) and Space Mono (code), matching `redis-docs/tailwind.config.js`. - Replace the default Material book icon with the cursive `redis` script wordmark (white) in the header (`docs/assets/redis-logo-script.svg`). - Use `Redis_Favicon_32x32_Red.png` from redis-vl-python as the browser favicon (`docs/assets/favicon.png`). - Bold every top-level entry in the left sidebar so single-page items (Home) match the section-header weight given by `navigation.sections`. Independent site: - Remove the Redis AI Hub header injection (`docs/javascripts/redis-ai-hub-header.js` and the matching CSS). This site stands on its own; it is no longer embedded under the hub chrome. - Drop the now-empty `docs/javascripts/` directory. - Slim the stylesheet from 217 lines to 39 and rename it to `redis-brand.css` to reflect what it now contains. README: - Restore the comprehensive content (TEXT search modes, IS NULL / ismissing, exists(), DATE/DATETIME handling, date functions, full GEO feature catalog, design rationale, architecture diagram). - Reorganize along Diataxis tiers: Tutorial then Reference then How-to then Explanation then practical sections. - Note that docs.redisvl.com/projects/sql-redis/ is not yet live and point readers to `make docs-serve` for local previews. - Keep the recent improvements (`pip install`, `create_executor()` factory, `make install/test/lint`, AI Hub status note). For-AI-agents audit: - Replace stale Sphinx references (`autoclass`, `sphinx-build -W`) with their MkDocs equivalents (`mkdocstrings`, `mkdocs build --strict`) in `AGENTS.md`, `docs/for-ais-only/index.md`, and `docs/for-ais-only/BUILD_AND_TEST.md`. `mkdocs build --strict` passes.
1 parent d19a0c9 commit 7db408b

42 files changed

Lines changed: 1611 additions & 1215 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ Thumbs.db
5454
.ai/
5555
nitin_docs/
5656

57-
# Sphinx build output
57+
# MkDocs build output
58+
site/
5859
docs/_build/
5960

6061

.readthedocs.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ build:
2121
UV_PROJECT_ENVIRONMENT="${READTHEDOCS_VIRTUALENV_PATH}" \
2222
~/.local/bin/uv sync --frozen --group docs
2323
24-
sphinx:
25-
configuration: docs/conf.py
24+
mkdocs:
25+
configuration: mkdocs.yml
2626

2727
formats:
2828
- pdf

AGENTS.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ Full reference, generated from docstrings, is at `docs/api/`.
9696

9797
| Artifact | Purpose |
9898
|---|---|
99-
| [`docs/llms.txt`](docs/llms.txt) | Flat index of every doc page with one-line summaries. Cheap to grep, good for in-context injection. |
100-
| [`docs/api/`](docs/api/) | Sphinx `autoclass` reference for every public symbol. Source of truth for method signatures. |
99+
| [`llms.txt`](https://docs.redisvl.com/projects/sql-redis/llms.txt) | Auto-generated flat index of every doc page with one-line summaries. Built by `mkdocs-llmstxt` at deploy time. Good for in-context injection. |
100+
| [`docs/api/`](docs/api/) | mkdocstrings reference for every public symbol, generated from Google-style docstrings. Source of truth for method signatures. |
101101
| [`docs/user_guide/how_to_guides/`](docs/user_guide/how_to_guides/) | Task-oriented recipes (vector search, GEO, dates, async, parameters). |
102102
| [`docs/concepts/`](docs/concepts/) | Why-style explanation: architecture, parameter substitution, schema-aware translation. |
103103
| [`docs/for-ais-only/`](docs/for-ais-only/) | Internal repo map for agents modifying the library. |
@@ -107,7 +107,7 @@ Full reference, generated from docstrings, is at `docs/api/`.
107107
sql-redis sits in the [Redis AI Hub](https://redis.io/ai-hub/) under the
108108
*Experimental* tier as "SQL for Redis". Public docs URL:
109109
[`docs.redisvl.com/projects/sql-redis/`](https://docs.redisvl.com/projects/sql-redis/).
110-
The hub's docs standards (Diataxis layout, autoclass-driven API reference,
110+
The hub's docs standards (Diataxis layout, docstring-driven API reference,
111111
AI-agent affordances) are documented at
112112
[`HUB_DOCS_STANDARDS.md`](https://github.com/redis/docs/blob/main/HUB_DOCS_STANDARDS.md)
113113
in the hub repo.

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,11 @@ build: ## Build wheel and source distribution
5151

5252
docs-build: ## Build documentation
5353
@echo "📚 Building documentation"
54-
uv run --group docs make -C docs html
54+
DISABLE_MKDOCS_2_WARNING=true uv run --group docs mkdocs build --strict
5555

5656
docs-serve: ## Serve documentation locally at http://localhost:8000
5757
@echo "🌐 Serving documentation at http://localhost:8000"
58-
@echo "📁 Make sure docs are built first with 'make docs-build'"
59-
uv run python -m http.server --directory docs/_build/html
58+
DISABLE_MKDOCS_2_WARNING=true uv run --group docs mkdocs serve --dev-addr 127.0.0.1:8000
6059

6160
clean: ## Clean up build artifacts and caches
6261
@echo "🧹 Cleaning up directory"
@@ -69,6 +68,7 @@ clean: ## Clean up build artifacts and caches
6968
find . -type d -name "build" -exec rm -rf {} + 2>/dev/null || true
7069
find . -type d -name "*.egg-info" -exec rm -rf {} + 2>/dev/null || true
7170
find . -type f -name "*.log" -exec rm -rf {} + 2>/dev/null || true
71+
rm -rf site
7272

7373
help: ## Show this help message
7474
@echo "Available commands:"

0 commit comments

Comments
 (0)