Skip to content

Publish the documentation on GitHub Pages - #255

Merged
lyrixx merged 2 commits into
mainfrom
docs-site
Oct 14, 2026
Merged

lyrixx merged 2 commits into
mainfrom
docs-site

Conversation

@lyrixx

@lyrixx lyrixx commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

This PR publishes the documentation as a site, on GitHub Pages, built by Zensical.

The page "Opening a repository", in the light mode

Commits

  1. Indent the lists of UPGRADE-2.0.md and CHANGELOG.md like doc/. GitHub nests the blocks of a list item at the column of its text, Python-Markdown, which Zensical uses, at 4 spaces per level: the site rendered the nested lists and code blocks of these files out of their items. Whitespace only: GitHub renders both files the same, checked by comparing the output of cmark-gfm before and after.
  2. Publish the documentation on GitHub Pages.
    • doc/, README.md, UPGRADE-2.0.md and CHANGELOG.md become the pages of the site, with the theme of Zensical: a light and a dark mode, following the system or chosen, a search, a copy button on code blocks, a table of contents that follows the scrolling. The fonts are the ones of the system: no request to Google Fonts.
    • Zensical reads the pages from a single directory, which can't be the root of the repository, and runs no hooks yet. tools/zensical/pages.py, about 70 lines of Python without dependency, copies them to var/docs first, and rewrites the links between the files of the root and doc/. They stay relative paths of the repository: GitHub shows the same files as before.
    • The Documentation workflow builds the site in strict mode, where a broken link or anchor fails, on the pull requests that change it, and deploys it from main. Dependabot updates the Python dependencies of tools/zensical/requirements.txt.
    • zensical.toml stays out of the archive Composer installs.

To preview the site, with the packages of tools/zensical/requirements.txt:

python3 tools/zensical/pages.py && zensical serve

Why Zensical

It is the successor of Material for MkDocs, by its team: Material is in maintenance mode, and MkDocs 1.x is no longer maintained, while MkDocs 2.0, in pre-release, drops plugins. Zensical is at 0.0.70, released often: requirements.txt pins it, and Dependabot proposes the updates.

Before merging

  • Settings → Pages → Source: "GitHub Actions". The deploy job fails until then.

Known limits

  • The link to the repository, in the header, shows the latest release and the stars, which the browser of the reader asks the API of GitHub for.
  • zensical serve shows the copies of pages.py: a change to the pages needs it again.
  • The copy button copies the $ of the shell examples too.
  • With startinline, a <?php at the start of an example is colored as text.
On a phone, in the dark mode

The upgrade guide on a phone, in the dark mode

Base automatically changed from hardening to dto October 14, 2026 13:50
@lyrixx
lyrixx changed the base branch from dto to main October 14, 2026 13:59
GitHub nests the blocks of a list item at the column of its text, 2
spaces after "- " and 3 after " * ". Python-Markdown, which builds the
documentation site, nests them at 4 spaces per level: it rendered the
nested lists and the code blocks of these files out of their items.

Their items are written like the pages of doc/ write them, "-   text",
with a blank line between a nested block and the next item of a loose
list. Only whitespace changes: GitHub renders both files the same.
doc/, README.md, UPGRADE-2.0.md and CHANGELOG.md become a site, built by
Zensical with its theme: a light and a dark mode, a search, the fonts of
the system, and no request to Google Fonts.

Zensical reads the pages from a single directory, which can't be the
root of the repository, and runs no hooks: tools/zensical/pages.py
copies them to var/docs first, and rewrites the links between the files
of the root and doc/, which stay relative paths of the repository, as
GitHub shows them.

The Documentation workflow builds the site, strictly, on the pull
requests changing it, and deploys it to GitHub Pages from main.
Dependabot updates its Python dependencies. zensical.toml stays out of
the archive Composer installs.
@lyrixx
lyrixx merged commit 88c631f into main Oct 14, 2026
13 checks passed
@lyrixx
lyrixx deleted the docs-site branch October 14, 2026 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant