Skip to content

Move the site to Zensical, and modernize its tooling - #34

Open
patrick-5546 wants to merge 19 commits into
mainfrom
zensical
Open

patrick-5546 wants to merge 19 commits into
mainfrom
zensical

Conversation

@patrick-5546

@patrick-5546 patrick-5546 commented Dec 1, 2026 •

Copy link
Copy Markdown
Owner

Moves the site from Material for MkDocs to Zensical, and brings the repository's tooling in line with md-doc-converter and rtl-project-template: uv and pyproject.toml, a Makefile, rumdl, typos, actionlint and zizmor, SHA-pinned workflows, Dependabot with a cooldown, EditorConfig and AGENTS.md. Companion to patrick-5546/dotfiles#9 (merged), which sets Neovim up to lint and format Markdown with rumdl.

Your questions

What switching to Zensical involves. Less than expected. Zensical 0.1.x builds the old mkdocs.yml unchanged and passes --strict. The real work was:

  • converting the configuration to zensical.toml
  • deploying with GitHub Pages' Actions workflow, since Zensical has no gh-deploy
  • dropping the Cairo dependencies, since social cards are built in
  • rewriting the page about the site's own setup

Should Zensical Studio be used? Yes, in VS Code. The free edition previews the pages, completes links, anchors, snippets and icons, and formats and lints the pages as you write. It has no Neovim client or command line yet; both are on Zensical's roadmap. Studio takes over docs/*.md as "Python Markdown", which rumdl's extension doesn't handle, so make lint and CI remain the gate.

Is every feature supported? Yes. All three plugins (search, git-revision-date-localized, social) are reimplemented natively. Admonitions, tabs, snippets, abbreviations, keys, math, icons, footnotes, task lists, code titles and line numbers, and <figure markdown> all render.

New features adopted:

  • The modern theme in teal, with tabs kept, plus the template's features: code copy buttons, breadcrumbs, footer navigation, rich tooltips, and edit, view-source and "Copy as Markdown" buttons
  • The glossary appended to every page automatically
  • Zensical's default Markdown extensions, which add Mermaid diagrams, definition lists, highlighting, sub- and superscripts, and smart symbols
  • llms.txt and llms-full.txt, plus an image lightbox
  • KaTeX in place of MathJax, plus drafts (*.draft.md), a site description and a CC0 footer, a logo and a favicon

Changes

  1. uv and make: pyproject.toml and uv.lock (releases at least 7 days old), a Python 3.15 pin, a Makefile (serve, build, lint, format, links, clean), .editorconfig and .gitattributes.
  2. Zensical: zensical.toml replaces mkdocs.yml. Notable details:
    • Google Analytics and polyfill.io (its domain was compromised in 2024) are gone.
    • KaTeX loads from jsDelivr at its latest 0.x release, as in Zensical's docs.
    • reference/mkdocs.md becomes reference/zensical.md, rewritten. Its old embeds pointed to files that no longer existed.
    • Fixed a pre-existing rendering bug: a markdownlint comment split the less table on the Unix page.
  3. GitHub Actions:
    • ci.yml lints and builds every push and PR. The strict build is the check for broken links, anchors and snippets.
    • deploy.yml builds again and deploys to Pages on every push to main, and on demand, as Zensical's own docs repo does. Only its deploy job can publish.
    • links.yml runs make links weekly, on demand, and on pull requests that change it or lychee.toml. It fails only on dead links, not on sites that block GitHub's runners or rate-limit them. It replaces a scheduled check whose config file didn't exist. lychee comes from PyPI through uv, in its own dependency group, so it's locked and updated with the rest.
    • Actions are SHA-pinned with least-privilege permissions; Dependabot covers actions and uv.
  4. Content fixes: the glossary defined RAM as "Read Access Memory", which every page now shows; it's "Random Access Memory". The new checks found 5 typos and 3 "here" links, plus 9 broken URLs:
  5. Markdown style: rumdl uses its defaults for MkDocs, with no line length limit, as in Zensical's docs, and code blocks name their language. Zensical Studio formats the pages as Zensical's own docs are formatted, and rumdl accepts its format.
  6. VS Code: recommends Zensical Studio, rumdl, typos and Tombi, which gives zensical.toml the TOML mode Studio needs. zensical-studio.toml turns on Studio's linter. The old debugpy launch configurations and cSpell settings go.
  7. Docs: each topic lives in one place.
    • A new README covers working on the repository: setup, commands, writing notes, editors, CI, updating dependencies, and conventions, including the ruleset that protects main. AGENTS.md points agents to it.
    • The Zensical page covers Zensical: the site's layout, settings, plugins and features, and how it's built and deployed.
    • LICENSE.md becomes LICENSE, as GitHub rendered its plain-text legal code with code blocks.

Verification

  • make lint passes, with zizmor's online audits (GH_TOKEN=$(gh auth token)).
  • make build passes in strict mode with no warnings.
  • make links (lychee 0.24.2, from uv) fails only on the README's two links to the new /reference/zensical/ page, which resolve once this PR deploys. The Links check on this PR shows the same. Its first runs also failed on four sites that block GitHub's runners (403), and on github.com's rate limits (503), which lychee now accepts.
  • All 148 formulas parse in strict mode with KaTeX 0.19.1, which katex@0 resolves to. One used MathJax-only \displaylines and now uses gathered.
  • Studio's formatting changes no rendered content: every page's HTML is the same, apart from whitespace. A second pass changes nothing, rumdl passes, and rumdl fmt leaves it unchanged.
  • The simpler llms.txt sections produce the same llms.txt, llms-full.txt and page Markdown.
  • Headless Chromium rendered the key pages in light and dark mode:
    • KaTeX fonts, Mermaid, tabs, keys, embeds and the lightbox all render.
    • There were no console errors and no failed requests.
    • Off-site requests go to Google Fonts, jsDelivr for KaTeX, unpkg for Mermaid and glightbox, and api.github.com for the header's star and fork counts.
  • Drafts appear in make serve and are left out of the build. Strict mode reports broken links during serve without stopping the server.

After merging (I'll do these with gh)

  1. Switch Pages to "GitHub Actions" (build_type=workflow), run the Deploy workflow (gh workflow run deploy.yml), and confirm that the live site's generator is Zensical. Then limit the github-pages environment to main.
  2. Change the repo topics: remove mkdocs-material, add zensical.
  3. Run the Links workflow once on main.
  4. With your OK: delete the GOOGLE_ANALYTICS_KEY secret and the gh-pages and test-mike branches, and close Set up versioning #32 (mike).

Follow-ups, not in this PR

  • reference/python.md still teaches pip, venv and requirements.txt; it could cover uv.
  • The CLI and terminal setup pages describe dotfiles that have since moved (dot_config/git/config.tmpl, dot_zshrc, btop, the run_onchange_* scripts) or were removed (Alacritty).
  • /reference/mkdocs/ will 404, since redirects weren't added.
  • Neovim: Studio's server is a language server, which also ran outside VS Code in a test. Zensical plans Neovim support.

patrick-5546 and others added 3 commits November 30, 2026 20:24
pyproject.toml declares Zensical and the linters, and uv.lock pins them,
taking only releases at least a week old. The Makefile runs each task
through uv: serve, build, format, lint, links and clean. EditorConfig gives
editors the indentation that Python Markdown nests content by, and
.gitattributes LF line endings.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Zensical, from the team behind Material for MkDocs, reads the same Markdown
and implements the plugins the site uses itself. zensical.toml, from the
template that `zensical new` writes, replaces mkdocs.yml.

- The modern theme, in teal, keeps the top-level tabs and adds the
  template's features: code copy buttons, breadcrumbs, footer navigation,
  rich tooltips, and edit, view source and "Copy as Markdown" buttons.
- New plugins: llmstxt, and glightbox for images. The site drops Google
  Analytics.
- KaTeX, from jsDelivr at an exact version, replaces MathJax and
  polyfill.io, whose domain was compromised in 2024. KaTeX lacks MathJax's
  \displaylines, so one formula uses a gathered environment instead.
- Snippets appends the glossary to every page, instead of each page
  including it, and a missing snippet fails the build.
- New extensions from the template: Mermaid diagrams, definition lists,
  highlighting, sub- and superscripts, smart symbols and automatic links.
- Pages named *.draft.md appear only in the preview.
- reference/mkdocs.md becomes reference/zensical.md, rewritten for the new
  setup. The old page embedded files that no longer existed.
- The less command's last table row was a paragraph, as the comment above it
  for markdownlint ended the table.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The CI workflow lints and builds the site on every push and pull request,
and deploys it to GitHub Pages with deploy-pages on every push to main, as
Zensical has no gh-deploy command. The site's own links are checked by every
strict build, and lychee checks the links to other sites every week and on
demand, replacing the scheduled link check, whose configuration file didn't
exist.

The actions are pinned to commit SHAs, the jobs have only the permissions
they need, and the checkouts keep no credentials; actionlint and zizmor
check the workflows. Dependabot proposes weekly updates for the actions and
the Python packages, a week after their release, and the release notes list
them as dependency updates.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
patrick-5546 and others added 5 commits November 30, 2026 20:36
typos found four misspellings, beside one of which "Bread-first search"
was a fifth, and rumdl found three links titled "here". lychee found eight
broken URLs:

- Six to dotfiles that patrick-5546/dotfiles#7 removed. The pages describe
  those files, so the links point to the last commit that had them.
- Two to pages that no longer exist, which link to the Internet Archive's
  copies instead.

The glossary defined RAM as "Read Access Memory", which every page's
tooltip now shows, as each page gets the glossary.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
VS Code recommends Zensical Studio, which previews the pages and checks
their links, snippets and icons as you write, and the rumdl and typos
extensions in place of markdownlint and Code Spell Checker.
zensical-studio.toml turns on Studio's linter. The tasks run the Makefile's,
replacing the launch configurations that ran `mkdocs serve` through debugpy.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The README covers setup, tasks, writing pages, Neovim and VS Code,
updating dependencies and conventions. The Zensical page links to it for
the tasks, the editors and updating dependencies, instead of repeating
them, and keeps explaining how the site is built. AGENTS.md points agents
to the README, and lists the checks to run before finishing.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The deploy job was part of the CI workflow, so pull requests listed it as a
skipped check. The Deploy workflow runs on every push to main and on demand,
as Zensical's own documentation does, with a build job that can only read
the repository and a deploy job that alone can publish to GitHub Pages. CI
lints and builds, the two checks that the ruleset protecting main requires.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@patrick-5546
patrick-5546 force-pushed the zensical branch 2 times, most recently from eb57e2a to 60d25a2 Compare December 1, 2026 09:42
Comment thread Makefile Resolved
Comment thread pyproject.toml Resolved
Comment thread docs/javascripts/katex.js Resolved
Comment thread docs/reference/zensical.md Resolved
Comment thread zensical.toml Resolved
Comment thread README.md Outdated
- [Zensical Studio](https://zensical.org/studio/) previews the pages, completes links, anchors, snippets, and icons,
and reports problems such as broken links as you write; `zensical-studio.toml` configures its linter.
It reads the icons from Zensical in `.venv/`, so run `uv sync` first.
- rumdl lints and formats the other Markdown files, such as this one. Zensical Studio handles the pages in `docs/`.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so rumdl is not used for the pages in docs/?

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is: make lint, CI and Neovim check every page with rumdl. Only rumdl's VS Code extension skips them, as Studio opens docs/*.md in its Python Markdown mode, which the extension doesn't handle; Studio lints them there instead. The README no longer goes into it (3853b00).

@patrick-5546 patrick-5546 Dec 2, 2026 •

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it worth adding and integrating studio free if I am mostly not using vs code? Either AI edited or in neovim? In vs code does it format on save? Should it? Also still early stages with no cli or neovim support

Comment thread README.md Resolved
Comment thread README.md Resolved
Comment thread docs/reference/zensical.md Resolved
Comment thread README.md Resolved
patrick-5546 and others added 11 commits December 1, 2026 16:30
LICENSE.md holds CC0's plain-text legal code, whose indented paragraphs
GitHub rendered as code blocks. LICENSE is the usual name, which GitHub
also detects, and rumdl no longer needs to skip it. The README's License
section goes too: GitHub shows the license, and the site's footer states it.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The settings came from the old markdownlint config. rumdl's MkDocs flavor
already requires the four-space nesting that Python Markdown needs, and its
defaults keep each file's list markers and rules consistent, so those
settings go. There's no line length limit, as in Zensical's own docs. Code
blocks name their language, for the right highlighting: shell commands are
sh, and diagrams and pseudocode are text.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
InterviewBit's OOP interview questions page is gone, so the link goes to
its last Internet Archive copy. Zensical Studio reported the bracketed
"[nondeterministic]" as a missing link reference, so the brackets are
escaped; the page shows them as before.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
lychee-bin, which lychee's maintainers publish on PyPI, is in its own
dependency group, so only `make links` installs it, not `uv sync` or the
other tasks: its Linux wheels are about 75 MB. The Links workflow runs
`make links` instead of lychee-action, so CI checks with the same version,
which Dependabot updates with the rest of uv.lock. It also runs on pull
requests that change it or lychee.toml, so they're tested before merging.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Checking every link at once, github.com answered some with 503s, and
which ones changed from run to run. Two requests at a time to each site,
half a second apart, removed them, and a check takes about 30 seconds.
lychee now also checks the links to files, such as the README's, which the
site's build never sees.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Dependabot can't update the version in zensical.toml's URLs, so it was
pinned and updated by hand. jsDelivr now serves the latest 0.x release,
which updates itself, as in Zensical's own setup for KaTeX.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
In llmstxt's patterns, `*` also matches the pages in nested folders, so
each section needs only one, and llms.txt, llms-full.txt and the pages'
Markdown are unchanged. The nav's comments, carried over from mkdocs.yml,
were notes to myself that the site never shows; the Internship Preparation
page already says that it's a supplementary resource.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
VS Code has no TOML support, and Zensical Studio only handles zensical.toml
in the TOML mode that an extension provides. Tombi replaces Even Better
TOML, which hasn't been released since 2024, and whose maintainers say none
are coming. Red Hat's YAML extension only added checks for dependabot.yml
and release.yml, and unwantedRecommendations only hid a recommendation
without disabling the extension, so both go. The tasks only wrapped make.
The README no longer describes Neovim, as there's nothing to set up.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The page also described the repository's tooling, its lint and link check
workflows, and embedded pyproject.toml and the Makefile, none of which are
about Zensical. They move to a short CI section in the README, which
already covers the tooling. The page keeps the site's layout, settings,
plugins and features, and how it's built and deployed, and its embedding
demo now embeds zensical.toml.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Studio formats the pages as Zensical's own docs are formatted:
- a list item's text starts at its nested content's four-space indent
- an admonition's text follows a blank line
- tables' columns line up
- emphasis uses underscores

rumdl expected one space after a list marker, so a page formatted in VS
Code failed its check. Without that rule, rumdl accepts Studio's format, and
its own formatter leaves it unchanged. The pages render the same, apart
from whitespace.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
On GitHub's runners, four sites refuse requests with 403, and github.com
rate-limits its file pages with 503s that lychee's retries don't get past.
lychee now accepts 403, 429 and 503, which also covers Stack Overflow, so
only LinkedIn's 999 needs an exclude.

The token goes too: lychee only uses it to check that a repository exists,
which doesn't help with a file page.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

This branch has not been deployed

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

Labels

infrastructure Infrastructure updates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant