Skip to the content.

← Command reference · lean-pkg site · CLI overview

lean-pkg site check

read-only: check the site in DIR (default docs): generated pages current and linked, Markdown inside HTML blocks, mathematics, the noindex while private, the files it serves, a shadowing index.html; hand-written counts are warnings; exit 0/1.

Usage

lean-pkg site check [--dir DIR] [--repo DIR] [--no-registry]
                    [--allow-private-manuscript] [--json] [NAME]

Arguments and flags

Argument or flag Description
NAME  
--dir DIR the site directory, relative to the repository root (default: docs)
--repo DIR with NAME: check this checkout of the package instead of the registered local_path
--no-registry read no registry record: the repository is the current directory; the checks that need the record (generated pages current, the noindex against the visibility) are reported as not checked (the form a package’s CI runs)
--allow-private-manuscript as for page: render the generated pages of a package whose manuscript is unposted

Details

Form What it does Key flags
site check NAME read-only, proposal 0012 phase 1: the package’s documentation site in DIR (default docs), of any kind: static (DIR/.nojekyll), mkdocs (mkdocs.yml whose docs_dir is DIR) or jekyll. Fails on a generated page (verification.md, coverage.md) stale against page --site or not linked, Markdown inside an HTML block, mathematics without MathJax in the head, the noindex meta tag missing while the record’s visibility is private (or present once public), a served copy of a build input, and an index.html shadowing index.md; warns about the opt-in key, counts, versions and commits written by hand outside generated blocks, a hand-written page under a generated name, and unclassified served files. Verdict first; exit 0 or 1; --json {ok, name, dir, kind, opt_in, registry, generated[], stale[], links, html_blocks[], counts[], exemptions[], math, noindex, served, shadowing_index_html, binding, snapshot, problems[], warnings[]} (The site standard) [--dir DIR] [--repo DIR] [--allow-private-manuscript]
site check --no-registry (or no NAME) the CI form: the repository is the current directory and no registry record is read, so the generated-page comparison and the noindex-against-visibility check are listed as not checked; --repo needs NAME (exit 2) [--dir DIR]

Examples

Check the package’s documentation site in docs/ (Jekyll, MkDocs or static) against the registry record.

lean-pkg site check my-proof

The CI form, in the checkout; the checks that need the record are listed as not checked.

lean-pkg site check --no-registry

Sample output:

site check: (no registry): OK; jekyll site in docs/, not opted in; 0 problem(s), 3 warning(s)
  ! not opted in: add `lean_pkg_site: 1` to docs/_config.yml (proposal 0012)
  ...