Skip to the content.

← lean-pkg documentation

The site standard

A Lean companion has three front doors: the README (what it is, its status, how to reproduce it), the site (the same, laid out for a reader: the results, the verification page, how to cite it) and llms.txt (the entry point for an agent). Proposal 0012 gives the site one standard that lean-pkg can check, keep current and create. It ships in three phases:

  1. lean-pkg site check (this release): an offline check of the site, of any kind, opted in or not.
  2. lean-pkg site render: the generated pages and the generated blocks inside hand-written pages (counts, versions, commits, llms.txt), the noindex block and the fence converter.
  3. lean-pkg site init, and the site item of publish.

Until phase 2, the checks that only a render can satisfy are warnings: the hand-written counts, the opt-in key, and a hand-written page under a generated name.

Site kinds

site check reads the site directory DIR (default docs, relative to the repository root) and decides its kind:

Kind Detected by Where the head (noindex, MathJax) is Navigation
static DIR/.nojekyll each served .html file the landing page’s links
mkdocs mkdocs.yml at the repository root whose docs_dir is DIR (MkDocs’ default is docs) the theme’s custom_dir templates, or extra_javascript nav in mkdocs.yml (no nav: every page)
jekyll anything else GitHub Pages builds from DIR (_config.yml, or an index page) DIR/_layouts/*.html and DIR/_includes/*.html the landing page, the layouts and includes

A static site serves its files exactly as committed, so _config.yml there does nothing and Markdown pages are served as text. A Jekyll site with theme: null and a layout of its own puts its head in that layout: a theme’s head include (_includes/head-custom.html) is never read there.

A site opts in with one key its host ignores: lean_pkg_site: 1 in DIR/_config.yml (jekyll), under extra: in mkdocs.yml (mkdocs), or in DIR/lean-pkg-site.yaml (static). In phase 1 the key changes nothing but the warning; site render will act only on an opted-in site.

What site check checks

lean-pkg site check my-proof              # with the registry record
lean-pkg site check --no-registry         # in the checkout, no registry (the CI form)
lean-pkg site check my-proof --dir site   # a site directory other than docs

Problems (exit 1):

Warnings (exit 0):

--json prints the whole result. Its keys: ok, name, dir, kind, opt_in, registry, generated[], stale[], links (missing[]), html_blocks[], counts[], exemptions[], math (pages_with_math, mathjax, problems[]), noindex (expected, present, files[]), served (files, build_input_copies[], unclassified[]), shadowing_index_html, binding, snapshot, problems[] and warnings[]. binding and snapshot are null until phase 2.

Writing for both GitHub and the site

The noindex while private

A private package’s site should not be indexed. On a project site (OWNER.github.io/REPO) the only lever is the meta tag in each page’s head: robots.txt takes effect only at the root of a user or organization site. The tag does not cover plain-text files the site serves (llms.txt), and it is advisory: it keeps well-behaved crawlers out, it does not restrict who can open the site. Remove it when the package is promoted.