Skip to content

docs: switch to Zensical, fix publishing, and restyle the reference - #833

Merged
psteinroe merged 3 commits into
mainfrom
docs/zensical
Oct 5, 2026
Merged

psteinroe merged 3 commits into
mainfrom
docs/zensical

Conversation

@psteinroe

Copy link
Copy Markdown
Collaborator

Fixes the docs site, which still served 0.26.0, and reworks the generated reference.

Why 0.27.0 never went live

The release published the same commit that the push to main had published an hour earlier. GitHub Pages treats a second deployment of a commit as done, so it reported success and kept the old site: /latest/ and latest/schema.json are 0.26.0, and /0.27.0/ is a 404. mike already commits every version to gh-pages, so the docs workflow now only runs mike, and Pages should serve the gh-pages branch. The separate upload and deploy job is gone.

Zensical

The site moves from the readthedocs theme to Zensical, with Zensical's fork of mike for the version selector. Tables wrap (readthedocs forbids line breaks in cells, which made the rule tables very wide), and the site gets search, dark mode, and copy buttons. mkdocs.yml and the navigation stay; the only new page is an "Upgrading to 0.27" guide.

Generated reference

  • Rule indexes have two columns, with ✅ recommended, 🛠 migrations only, 🔌 needs a database, ⚡ needs Supabase. Summaries no longer run words together ("ruleneeds"), and database rule descriptions render their backticks.
  • Rule pages start with one metadata block: group, recommended, migrations only, the release the rule shipped in, the diagnostic, and the Postgres error codes of typecheck rules. "Since" showed vnext for every rule; each rule now records its first release, backfilled from the tags.
  • Typecheck examples run against the built-in catalog of Postgres 18 from the regression fixtures, so the type mismatch examples show their diagnostics again.
  • Database rule pages move to reference/database-rules/, with redirects from the old URLs, and their SQL query is collapsed at the bottom.
  • The CLI reference and the default configuration in Getting Started weren't regenerated anymore, because a formatter had rewritten their section markers. The CLI reference now lists the PGLS_* variables, and env_variables.md moves the PGT_* ones under "Deprecated".

Type checking page

The typecheck rules are the method; the EXPLAIN-based check is described as legacy and planned for removal (added to #832).

Fixes found along the way

  • start --config-path read PGLS_LOG_PREFIX_NAME instead of PGLS_CONFIG_PATH.
  • When both are set, the PGLS_* variables now win over the legacy PGT_* ones.
  • init wrote $schema: https://pg-language-server.com/schemas/<version>/schema.json, which is a 404. It now writes /<version>/schema.json.

Releases

After the draft release is created, the release workflow opens a PR that replaces version: "next" of new rules with the released version. The docs build of a release stamps the generated pages itself, so released docs are right even before that PR merges.

After merging

Switch Pages to "Deploy from a branch: gh-pages". The merge's docs run then publishes the current site, 0.27.0 included.

… that exists

`start --config-path` read the log prefix variables instead of
PGLS_CONFIG_PATH, and the PGLS_* names now come first so they win over the
legacy PGT_* names. `init` wrote $schema as /schemas/<version>/schema.json,
which doesn't exist; the docs publish it under /<version>/schema.json.
Rule summaries no longer run words together, database rule descriptions
render their backticks, rule pages get a compact metadata block with the
Postgres error codes of typecheck rules, and database rule pages move to
reference/database-rules with their SQL collapsed. Typecheck examples run
against the built-in catalog, every rule records the release it shipped in,
and the generator updates the CLI reference and default configuration again,
whose section markers it no longer matched.
Publishing the same commit twice made GitHub Pages keep the old site, so
0.27.0 never went live. mike's gh-pages branch is now served directly. Adds
an upgrade guide for 0.27, describes the EXPLAIN-based check as legacy, and
has releases open a PR that stamps the version of new rules.
@psteinroe
psteinroe merged commit 929dfcd into main Oct 5, 2026
9 checks passed
@psteinroe
psteinroe deleted the docs/zensical branch October 5, 2026 06:52
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.

1 participant