Skip to content

docs: add versioned documentation site built with Zensical#1011

Draft
nielspardon wants to merge 4 commits into
substrait-io:mainfrom
nielspardon:docs/zensical-site
Draft

docs: add versioned documentation site built with Zensical#1011
nielspardon wants to merge 4 commits into
substrait-io:mainfrom
nielspardon:docs/zensical-site

Conversation

@nielspardon

Copy link
Copy Markdown
Member

What

Adds a user-facing documentation site under docs/, built with
Zensical (from the Material for MkDocs team) and published
as multi-version docs via the Zensical-compatible fork of
mike. There was previously no user-facing
guide — users learned the API from the READMEs and tests. Tooling and layout
mirror substrait-io/substrait-python so the two repositories stay consistent.

Contents

  • docs/ — comprehensive guides segmented into the four modules:
    • Core — building plans (the SubstraitBuilder DSL), types, expressions,
      relations, serialization, extended expressions, function & type extensions.
    • Isthmus — SQL ⇄ Substrait, SQL expressions, Substrait → SQL / Calcite,
      the type system, customization, and supported SQL.
    • Isthmus CLI — install/build, usage (all flags), and worked examples.
    • Spark — compatibility & per-variant dependencies, producing and consuming
      plans, supported features, and the end-to-end example.
    • Plus a landing page and getting-started. Every code sample is grounded in the
      real APIs and tests rather than invented.
  • zensical.toml — Material theme, site_url, explicit nav, and the mike
    version provider (renders the version selector).
  • pixi.toml — a docs environment (zensical + the mike fork) with
    docs-build / docs-serve tasks. Python and the docs dependencies are managed
    with pixi.
  • CI.github/workflows/docs.yml build-checks the docs on every PR and push
    to main. .github/workflows/docs-deploy.yml publishes versioned docs to the
    gh-pages branch via mike on release tags (the bare X.Y.Z tag publishes the
    minor series X.Y and updates the latest alias), and can be run manually via
    workflow_dispatch.
  • readme.md / CONTRIBUTING.md — a Documentation section (hosted URL, local
    preview/build, authoring guidelines).

Building locally

pixi run docs-serve   # live-reloading preview at http://localhost:8000
pixi run docs-build   # build the static site into ./site

Enabling GitHub Pages (one-time, after merge)

Versioned publishing needs the gh-pages branch to exist before Pages can point
at it:

  1. Actions → Deploy documentationRun workflow (creates gh-pages), or
    let the next release tag create it.
  2. Settings → Pages → Source → Deploy from a branch → gh-pages / (root).
  3. From then on, each release tag publishes that minor series and updates the
    latest alias. Adjust site_url in zensical.toml if the site is served from
    a custom domain.

Verification

  • pixi run docs-build completes with no issues (Zensical includes link validation).
  • Dry-ran mike deploy + mike set-default locally (no push): correct gh-pages
    layout (<version>/, latest/, .nojekyll, versions.json, root redirect).
  • Draft PR: the deploy workflow is intentionally not run against the canonical repo
    until GitHub Pages is enabled.

🤖 Generated with AI

Add a user-facing documentation site under docs/, built with Zensical and
published as multi-version docs via the Zensical-compatible fork of mike.
Tooling and layout mirror substrait-io/substrait-python.

- pixi.toml: a docs environment (zensical + mike fork) exposing docs-build /
  docs-serve tasks; Python and dependencies are managed with pixi
- zensical.toml: Material theme, explicit nav for the four modules, and the mike
  version provider for the version selector
- docs/: comprehensive guides for core, isthmus, isthmus-cli, and spark, plus a
  landing page and getting-started
- .github/workflows/docs.yml: build-check on pull requests and pushes to main
- .github/workflows/docs-deploy.yml: on release tags, publishes the minor
  version series to the gh-pages branch via mike and updates the latest alias

Enabling GitHub Pages is a one-time manual step: after the first deploy creates
the gh-pages branch, set Settings -> Pages -> Deploy from a branch -> gh-pages.
Tell agents that the user guide under docs/ must be kept in sync with the code
as substrait-java evolves, describe the Zensical + pixi tooling and how to
preview/build it, and add "update the docs/ page" to the feature-addition
checklist.
The CLI example output was carried over from the module README, which predates
the Substrait extension URI -> URN migration. Update the PROTOJSON snippets to
the current format: extensionUrns / extensionUrnAnchor / urn (e.g.
extension:io.substrait:functions_comparison) and extensionUrnReference, matching
what the tool emits today.
The isthmus-cli README example output predates the Substrait extension
URI -> URN migration. Update the PROTOJSON snippets to the current format
(extensionUrns / extensionUrnAnchor / urn / extensionUrnReference), matching the
CLI usage guide under docs/.
@mbwhite

mbwhite commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

will we be able to include the documentation from the JavaDoc as well?

@nielspardon

Copy link
Copy Markdown
Member Author

will we be able to include the documentation from the JavaDoc as well?

probably something we can investigate in a follow-up. technically, it is included via links but need to check what Zensical currently supports in terms of embedding it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants