Publish this site¶
The public docs are a MkDocs Material site. Getting-started pages live in docs-site/content/. Handbook pages are not edited there: docs-site/hooks.py copies docs/guides/, docs/reference/, and the root guides (ARCHITECTURE.md, CONTRIBUTING.md, SUPPORT.md, and the other project docs) into docs-site/content/handbook/ on every build.
That split keeps one source of truth. Change a command in docs/reference/CLI_REFERENCE.md and the next build publishes the change. Change install steps in docs-site/content/installation.md.
Preview locally¶
From the repository root, with Python 3.9 or newer:
Open http://127.0.0.1:8000. make docs writes the static site to docs-site/site/ and fails on warnings (mkdocs build --strict), including a handbook page that exists on disk but is missing from docs-site/mkdocs.yml.
The hook path in docs-site/mkdocs.yml is hooks.py (relative to mkdocs.yml).
Enable GitHub Pages¶
The workflow .github/workflows/pages.yml builds the site and deploys it with the official GitHub Pages actions. It does not change .github/workflows/ci.yml, the release workflow, CodeQL, or dependency review.
A repository admin turns the site on once:
- Open Settings → Pages.
- Under Build and deployment, set Source to GitHub Actions.
- Push to the default branch
chakshu, or tomain, or run the Deploy GitHub Pages workflow with Run workflow.
Pull requests build the site and do not deploy it. The first successful deploy creates the github-pages environment. The published URL for this repository is:
https://qdevmahesh.github.io/chakshu/
site_url in docs-site/mkdocs.yml is that address. A fork that publishes its own Pages site should change site_url to https://<user>.github.io/<repo>/.
Add or rename a page¶
- Beginner pages: add a Markdown file under
docs-site/content/and anaventry indocs-site/mkdocs.yml. - Feature guides: add the Markdown file under
docs/guides/ordocs/reference/(the hook copies*.mdin those directories) and add anaventry. A new file that is not in the nav failsmake docs. - Keep commands aligned with
cmd/chakshu/main.goand the existing guides. Do not document a flag that the binary does not implement.
The theme uses system fonts (font: false) so the site does not call Google Fonts. Search is the built-in offline search index. There is no analytics snippet.
Architecture & Zensical readiness¶
Custom styling and client behavior are intentionally decoupled from third-party MkDocs plugins:
- Modular CSS (
content/stylesheets/):tokens.css,layout.css,components.css, andhomepage.css. - Vanilla JS (
content/javascripts/):theme.js(Mermaid theme synchronization) andshortcuts.js(⌘K//search trigger). - Zero third-party plugins: Only the built-in
searchplugin and standardpymdownx.*Markdown extensions are enabled, keeping future migration to Zensical straightforward.