Write & build docs¶
Author and build the Lakeflow Framework documentation — reStructuredText and MyST sources, Sphinx, and the hub-based information architecture.
For local setup, see Set up your environment (requirements-dev.lock includes docs dependencies).
For the contribution workflow and doc CI checks, see Contribution workflow.
Documentation layout¶
Source files live under docs/source/. Top-level navigation is defined in The Lakeflow Framework.
Section |
Role |
|---|---|
Home (The Lakeflow Framework) |
Landing page with hero and entry cards (docs/source/_landing.rst) |
Get Started |
Get Started — prose landing with paths to What is the Lakeflow Framework? and Quick Start |
Architecture |
Architecture — operating model, bundles, specs |
Samples |
The Samples — feature, pattern, and TPCH samples |
Build |
Build hub — structure, steps, spec reference, patterns |
Deploy |
Deploy hub — before you deploy, Deploy the Framework subsection, pipeline bundle local deploy, Setting up CI/CD |
Features |
Features hub — category sub-hubs and |
Contributors |
Contributors hub — env, git/releases, workflow, imports, this page |
Folder convention (site-wide):
docs/source/{section}/index.rst— top tab hub (Get Started, Build, Deploy, Features, …)docs/source/{section}/{topic}/index.rst— nested hub (for exampledeploy/framework/,features/metadata/)docs/source/{section}/.../*.rst— leaf pages (kebab-case filenames)docs/source/_*.rst— includes/partials only (not standalone nav pages)
Hub pages use:
A short intro paragraph
An
lf-feature-grid/lf-hub-gridcard block (seedocs/source/_landing.rst)A hidden
.. toctree::listing child pages (and optional:caption:groups for sidebar sections)
Nested section indexes (for example build/spec-reference/index, features/platform/index) are caption-only in docs/conf.py — the sidebar title links to the first child page.
URL redirects: When a published flat URL changes (RTD-era feature_cdc.html, deploy.html, etc.), add an entry under docs/redirects/. Post-build stubs are written for current and local-branch-preview only (see docs/scripts/write_redirects.py).
Writing documentation¶
Feature pages¶
When you add or change framework behavior:
Create or update
docs/source/features/{category}/{page-name}.rst(kebab-case)Include the standard metadata table (Applies To, Configuration Scope, Databricks Docs where relevant)
Add the page to the matching category hub
index.rsttoctree and to Features A–ZUpdate Data Flow Spec Reference when the Data Flow Spec schema changes
If the page replaces a flat URL already on
main, add a redirect indocs/redirects/features.yaml
Deploy and build pages¶
Deploy docs are split by audience:
Framework — Framework Deployment Options, Deploy framework from local machine, Installing the Framework as a Wheel under Deploy the Framework
Pipeline bundle — Deploy pipeline bundles from local machine
Shared — Before you deploy, Setting up CI/CD
Add new deploy guides to the appropriate hub toctree under docs/source/deploy/ (for example deploy/index.rst or deploy/framework/index.rst), and add a hub card when the page is a primary entry point.
Build guides live under the Build hub.
Cross-references¶
RST:
:doc:`page_name`or:doc:`Title <page_name>`MyST (
samples/index.md):{doc}`/samples/index`or{doc}`Title </path/to/page>`Sections:
:ref:`label-name`(use unique labels; avoid duplicating labels across spec ref pages)
Styling¶
Theme and HTML¶
Theme and build options:
docs/conf.py(sphinx_immaterial— do not change theme without team agreement)Brand CSS:
docs/source/_static/databricks-theme.css,docs/source/_static/custom.cssLanding and hub cards:
lf-feature-card,lf-hub-gridclasses in raw HTML blocks
Command-line and code blocks¶
Shell commands use the WAF-style command snippet pattern:
make -C docs html
``console`` +
:class: lf-command-block— terminal commands (copy button enabled viaconf.py)``python``, ``yaml``, ``toml`` — language blocks without
lf-command-blockunless the block is a shell one-linerSpec and config examples in body text use normal
.. code-block:: yaml/jsonas appropriate
Prerequisites checklists: on .md use MyST - [ ] task lists; on .rst wrap items in sphinx-immaterial .. task-list:: with - [ ] markers.
Build locally¶
Install dependencies¶
From the repo root (or use requirements-dev.lock from Set up your environment):
pip install --require-hashes --no-deps -r requirements-docs.lock
Note
requirements-dev.lock already includes requirements-docs.lock — a full dev install is enough for doc builds.
Build HTML¶
From the docs/ directory:
make html
Output: docs/build/html/index.html
Preview with a local HTTP server (recommended for navigation and version UI testing):
cd build/html && python3 -m http.server 8000
Then open http://localhost:8000/index.html.
Other targets¶
Command |
Purpose |
|---|---|
|
Spelling check (fails on misspellings; requires Enchant — |
|
Markdown export to |
|
Versioned site under |
|
Remove |
See docs/README.md for multiversion publishing rules and GitHub Pages layout.
Updating doc dependencies¶
Edit requirements-docs.txt, then regenerate lockfiles from the repo root:
./scripts/generate_lockfiles.sh
Commit the updated requirements-docs.lock (and related .lock files) in the same pull request.
CI checks¶
When you change files under docs/, run before pushing:
bash scripts/ci/docs_spelling_check.sh
bash scripts/ci/docs_html_check.sh
CI runs these when docs/ changes on pull requests. Keep Sphinx warnings below the CI threshold documented in Contribution workflow.
See also¶
Contributors — Contributors hub
Contribution workflow — pull request workflow
docs/README.md— multiversion builds and GitHub Pagesdocs/decisions/— architecture decisions for docs and packaging