Skip to content

docs: generate the home page and assets with a mkdocs hook - #753

Merged
thijmv merged 1 commit into
masterfrom
thijmv/mkdocs-hook
Nov 17, 2026
Merged

thijmv merged 1 commit into
masterfrom
thijmv/mkdocs-hook

Conversation

@thijmv

@thijmv thijmv commented Nov 12, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Currently, generated documentation files (docs/index.md and docs/assets) are checked in, so we need to manually keep them in sync. These files are regenerated by scripts/mkdocs.sh, which the CI workflow does not run, meaning the published site always serves a stale docs/index.md.

To resolve this, this PR makes the following changes:

  • Add a mkdocs hook that dynamically generates index.md from README.md and copies assets/ to the site at build time.
  • Document make docs/docs-build as the standard command for contributors, with mkdocs serve/build as an alternative (also for CI).
  • Delete the manually-synced files.

Fixes #752.

Test plan

make docs-build passes with no warnings and make docs reloads when changes to README/assets are made.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Architecture diagrams no longer render on GitHub because the source Markdown still references deleted docs/assets paths while assets are generated only during MkDocs builds.

1 open issue
What changed in this PR

This PR moves Kraken’s documentation home page and asset generation into MkDocs builds, removing manually synchronized copies and addressing #752.

Changes:

  • Generate the home page from README.md and include root assets through a MkDocs hook.
  • Standardize local preview and strict builds with Make targets and a virtual-environment wrapper.
  • Watch source files for live reload and trigger documentation CI when they change.
File Description
scripts/​mkdocs.sh Remove the wrapper that generated checked-in documentation.
scripts/​mkdocs_venv.sh Add a virtual-environment wrapper for MkDocs.
scripts/​mkdocs_hooks.py Generate the home page and register assets at build time.
mkdocs.yml Enable the hook and watch README and assets.
Makefile Update preview command and add strict documentation builds.
docs/​index.md Remove the manually synchronized home page.
docs/​CONTRIBUTING.md Document Make targets and direct MkDocs alternatives.
docs/​assets/​kraken-logo-color.svg Remove the duplicated logo asset.
docs/​assets/​kraken_core.svg Remove the duplicated core architecture diagram.
docs/​assets/​kraken_build_index.svg Remove the duplicated build-index diagram.
docs/​assets/​benchmark.svg Remove the duplicated benchmark graphic.
docs/​assets/​architecture.svg Remove the duplicated architecture graphic.
.github/​workflows/​pages.yml Trigger documentation CI for README, assets, and hook changes.

Review effort: Balanced

Comment thread scripts/mkdocs_hooks.py Resolved
@thijmv
thijmv force-pushed the thijmv/mkdocs-hook branch from 8d75591 to 873af59 Compare November 17, 2026 09:50
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@thijmv
thijmv force-pushed the thijmv/mkdocs-hook branch from 873af59 to dd44113 Compare November 17, 2026 12:05
@thijmv
thijmv merged commit 7a9a118 into master Nov 17, 2026
17 of 19 checks passed
@thijmv
thijmv deleted the thijmv/mkdocs-hook branch November 17, 2026 12:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Generated doc files are checked in

4 participants