# Extension points — krahets/hello-algo

> Canonical page: https://codevetter.com/unpack/hello-algo/extension-points

# Extension points — krahets/hello-algo

Scanned commit 28c1e74c1d3594fca7cc41b78a6bd18b700c5ce9 (2026-08-18). Generated by codevetter codevetter 1.12.0 on 2026-09-22.

The repo is built to be extended in five dimensions: new programming languages (add a codes/<lang> mirror + workflow + docs tabs), new chapters/sections (docs/chapter_x + nav entry + per-language code dirs), new locales (copy tree + INHERIT config + Dockerfile stage + alternate entry), new page features (custom admonition types, animation frame sets, pythontutor embeds), and theme behavior (override partials + CSS/JS). Some extension is registry-driven (Cargo.toml [[bin]], CMakeLists add_executable, mkdocs.yml nav) while the run-all harnesses auto-discover files via chapter_* globs.
- Add a new programming language: create codes/<lang>/chapter_* mirrors of the sample set, a modules/pkg/utils helper dir, a manifest (go.mod/package.json/Cargo.toml/.csproj/CMakeLists/build.zig pattern), a .github/workflows/<lang>.yml path-filtered to codes/<lang> and en/codes/<lang>, plus a === '<Lang>' tab in every docs code block and a README badge. — [codes/typescript/package.json](https://github.com/krahets/hello-algo/blob/28c1e74c1d3594fca7cc41b78a6bd18b700c5ce9/codes/typescript/package.json) [.github/workflows/typescript.yml](https://github.com/krahets/hello-algo/blob/28c1e74c1d3594fca7cc41b78a6bd18b700c5ce9/.github/workflows/typescript.yml) [docs/chapter_array_and_linkedlist/array.md#L60-120](https://github.com/krahets/hello-algo/blob/28c1e74c1d3594fca7cc41b78a6bd18b700c5ce9/docs/chapter_array_and_linkedlist/array.md#L60-L120) [README.md#L24-38](https://github.com/krahets/hello-algo/blob/28c1e74c1d3594fca7cc41b78a6bd18b700c5ce9/README.md#L24-L38)
- Add a new chapter or page: create docs/chapter_x/*.md (+ <page>.assets/ for images), register it in the nav tree in mkdocs.yml, and mirror it across locale docs trees and codes/<lang>/chapter_x directories. — [mkdocs.yml#L161-315](https://github.com/krahets/hello-algo/blob/28c1e74c1d3594fca7cc41b78a6bd18b700c5ce9/mkdocs.yml#L161-L315) [docs/chapter_sorting/quick_sort.md](https://github.com/krahets/hello-algo/blob/28c1e74c1d3594fca7cc41b78a6bd18b700c5ce9/docs/chapter_sorting/quick_sort.md)
- New Rust samples plug in via the Cargo.toml [[bin]] registry — each entry maps a bin name to a chapter_*/*.rs path with a '# Run Command: cargo run --bin <name>' comment; shared helpers go in codes/rust/src/include/ exposed through src/lib.rs. — [codes/rust/Cargo.toml#L7-45](https://github.com/krahets/hello-algo/blob/28c1e74c1d3594fca7cc41b78a6bd18b700c5ce9/codes/rust/Cargo.toml#L7-L45) [codes/rust/src/lib.rs](https://github.com/krahets/hello-algo/blob/28c1e74c1d3594fca7cc41b78a6bd18b700c5ce9/codes/rust/src/lib.rs) [codes/rust/src/include/print_util.rs](https://github.com/krahets/hello-algo/blob/28c1e74c1d3594fca7cc41b78a6bd18b700c5ce9/codes/rust/src/include/print_util.rs)
- New C/C++ samples plug in via per-chapter CMakeLists add_executable lines; a whole new chapter requires an add_subdirectory line in the root codes/c/CMakeLists.txt. — [codes/c/chapter_array_and_linkedlist/CMakeLists.txt](https://github.com/krahets/hello-algo/blob/28c1e74c1d3594fca7cc41b78a6bd18b700c5ce9/codes/c/chapter_array_and_linkedlist/CMakeLists.txt) [codes/c/CMakeLists.txt](https://github.com/krahets/hello-algo/blob/28c1e74c1d3594fca7cc41b78a6bd18b700c5ce9/codes/c/CMakeLists.txt)
- New locale: copy a locale tree, write a mkdocs.yml starting with 'INHERIT: ../mkdocs.yml' overriding site_name/site_url/docs_dir/site_dir/theme.language, add the language to extra.alternate, and add a COPY+mkdocs-build stage in the Dockerfile. — [en/mkdocs.yml](https://github.com/krahets/hello-algo/blob/28c1e74c1d3594fca7cc41b78a6bd18b700c5ce9/en/mkdocs.yml) [mkdocs.yml#L75-95](https://github.com/krahets/hello-algo/blob/28c1e74c1d3594fca7cc41b78a6bd18b700c5ce9/mkdocs.yml#L75-L95) [Dockerfile#L20-34](https://github.com/krahets/hello-algo/blob/28c1e74c1d3594fca7cc41b78a6bd18b700c5ce9/Dockerfile#L20-L34)
- Run-all harnesses auto-discover new files: test_all.py (glob 'chapter_*/*.py') and test_all.js (expandGlob 'chapter_*/*.js') pick up added samples with no registry edit — unlike Rust/C/C++ which need manifest entries. — [codes/python/test_all.py#L10](https://github.com/krahets/hello-algo/blob/28c1e74c1d3594fca7cc41b78a6bd18b700c5ce9/codes/python/test_all.py#L10) [codes/javascript/test_all.js](https://github.com/krahets/hello-algo/blob/28c1e74c1d3594fca7cc41b78a6bd18b700c5ce9/codes/javascript/test_all.js)
- New callout types are added via CSS: extra.css defines --md-admonition-icon--pythontutor and .admonition.pythontutor/details.pythontutor styles; the same pattern extends to new '??? <type>' admonitions. — [overrides/stylesheets/extra.css#L27-28](https://github.com/krahets/hello-algo/blob/28c1e74c1d3594fca7cc41b78a6bd18b700c5ce9/overrides/stylesheets/extra.css#L27-L28) [overrides/stylesheets/extra.css#L222-243](https://github.com/krahets/hello-algo/blob/28c1e74c1d3594fca7cc41b78a6bd18b700c5ce9/overrides/stylesheets/extra.css#L222-L243) [docs/chapter_array_and_linkedlist/array.md#L129](https://github.com/krahets/hello-algo/blob/28c1e74c1d3594fca7cc41b78a6bd18b700c5ce9/docs/chapter_array_and_linkedlist/array.md#L129)
- New animations need no code: any tabbed set whose labels are all '<N>' is auto-detected by animation_player.js's isAnimationSet() and upgraded to a slideshow — authors just add sequential frame PNGs as === '<k>' tabs. — [overrides/zensical/javascripts/animation_player.js#L1-45](https://github.com/krahets/hello-algo/blob/28c1e74c1d3594fca7cc41b78a6bd18b700c5ce9/overrides/zensical/javascripts/animation_player.js#L1-L45) [docs/chapter_sorting/quick_sort.md#L11-36](https://github.com/krahets/hello-algo/blob/28c1e74c1d3594fca7cc41b78a6bd18b700c5ce9/docs/chapter_sorting/quick_sort.md#L11-L36)
- Theme surface is extensible through Material's override blocks: main.html extends base.html (announce block), partials/{actions,comments,content}.html slot into content rendering — new per-page chrome plugs in here rather than by forking the theme. — [overrides/main.html#L1-35](https://github.com/krahets/hello-algo/blob/28c1e74c1d3594fca7cc41b78a6bd18b700c5ce9/overrides/main.html#L1-L35) [overrides/partials/content.html](https://github.com/krahets/hello-algo/blob/28c1e74c1d3594fca7cc41b78a6bd18b700c5ce9/overrides/partials/content.html) [overrides/partials/actions.html](https://github.com/krahets/hello-algo/blob/28c1e74c1d3594fca7cc41b78a6bd18b700c5ce9/overrides/partials/actions.html)
- Page-level feature flags via front matter: comments.html keys off page.meta.comments and content.html checks page.meta.hide for action buttons — new pages opt into features declaratively. — [overrides/partials/comments.html#L1](https://github.com/krahets/hello-algo/blob/28c1e74c1d3594fca7cc41b78a6bd18b700c5ce9/overrides/partials/comments.html#L1) [overrides/partials/actions.html#L2-16](https://github.com/krahets/hello-algo/blob/28c1e74c1d3594fca7cc41b78a6bd18b700c5ce9/overrides/partials/actions.html#L2-L16)
- pymdownx.snippets is enabled in mkdocs.yml but no docs page uses the --8<-- include syntax — an available-but-unused extension point that could replace manual code transcription. (inferred) — [mkdocs.yml#L125](https://github.com/krahets/hello-algo/blob/28c1e74c1d3594fca7cc41b78a6bd18b700c5ce9/mkdocs.yml#L125) [docs/chapter_array_and_linkedlist/array.md](https://github.com/krahets/hello-algo/blob/28c1e74c1d3594fca7cc41b78a6bd18b700c5ce9/docs/chapter_array_and_linkedlist/array.md)
- overrides/zensical/ is the forward extension path: zensical.toml + its own javascripts/stylesheets dirs define an alternate site build (Zensical SSG) where animation_player.js and animation_player.css already live — new interactive features land there first. — [overrides/zensical/zensical.toml](https://github.com/krahets/hello-algo/blob/28c1e74c1d3594fca7cc41b78a6bd18b700c5ce9/overrides/zensical/zensical.toml) [overrides/zensical/javascripts/animation_player.js](https://github.com/krahets/hello-algo/blob/28c1e74c1d3594fca7cc41b78a6bd18b700c5ce9/overrides/zensical/javascripts/animation_player.js) [overrides/zensical/stylesheets/animation_player.css](https://github.com/krahets/hello-algo/blob/28c1e74c1d3594fca7cc41b78a6bd18b700c5ce9/overrides/zensical/stylesheets/animation_player.css)

Every claim links to its cited files at the pinned commit. Citations identify source evidence; they do not establish runtime correctness. Independent CodeVetter scan — not reviewed by upstream maintainers.

## Public product links

- [CodeVetter](https://codevetter.com/)
- [Download](https://codevetter.com/download)
- [Documentation](https://codevetter.com/docs/)
- [Source](https://github.com/Codevetter/codevetter)
