Skip to content

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:

python3 -m pip install -r docs-site/requirements.txt
make docs-serve

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:

  1. Open Settings → Pages.
  2. Under Build and deployment, set Source to GitHub Actions.
  3. Push to the default branch chakshu, or to main, 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 a nav entry in docs-site/mkdocs.yml.
  • Feature guides: add the Markdown file under docs/guides/ or docs/reference/ (the hook copies *.md in those directories) and add a nav entry. A new file that is not in the nav fails make docs.
  • Keep commands aligned with cmd/chakshu/main.go and 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, and homepage.css.
  • Vanilla JS (content/javascripts/): theme.js (Mermaid theme synchronization) and shortcuts.js (⌘K / / search trigger).
  • Zero third-party plugins: Only the built-in search plugin and standard pymdownx.* Markdown extensions are enabled, keeping future migration to Zensical straightforward.