Skip to content

Commit 9da1369

Browse files
committed
[Docs] Fill in stub pages, fix drift, and add a real Chinese translation
Four English pages were `[TBD]` placeholders and `examples/simulation.md` carried 19 more `[TBD]` sections. Fill them in, verified against the wrapper source rather than assumed: - `getting_started/installation.md`: requirements, PyPI install, the three optional ML-backed algorithms and their CMake flags, source builds. - `examples/analysis.md`: all 11 `AnalysisOption` fields and 5 `AnalysisParam` fields with real defaults, output files, and the C-reader-only restriction. - `api.md`: hand-written reference for the full exported surface, including the actual enum members (`ReqOp` is `OP_*`, not `READ`/`WRITE`). - `developer.md`: layout, build system, testing, adding an algorithm, docs workflow, CI, releasing. - `examples/simulation.md`: real parameters and defaults for every algorithm, plus the missing `Size` section, the `cache_size`-as-ratio behaviour, and a `CacheBase` method table. Corrections to existing content: Python floor is 3.10 (not 3.9) per `requires-python`; `int_freq` -> `init_freq`; a quickstart snippet used an undefined `lcs`; the FAQ used an absolute URL that broke under locale fallback. Two lists rendered as literal `*` characters because they lacked a preceding blank line. The Chinese tree was three orphaned files at non-mirroring paths, so they never rendered, and they documented an API that does not exist (`cache.get_hit_ratio()`, `PythonHookCache`, `SyntheticReader(dist=...)`). Delete them and translate all ten pages at paths mirroring `en/`. Link-target headings carry explicit `attr_list` anchor IDs so cross-page anchors resolve identically in both languages. `nav_translations` gains the three labels that were still English, and `Getting Started` becomes "入门指南" so it no longer collides with the Quickstart page's own title. `mkdocs build --strict` passes and all 11 anchors are present in the built HTML. Also ignore `docs/site/`, since the existing rule only covered `/site` at the repo root.
1 parent 7079d27 commit 9da1369

22 files changed

Lines changed: 2442 additions & 1102 deletions

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ venv.bak/
153153

154154
# mkdocs documentation
155155
/site
156+
docs/site/
156157

157158
# mypy
158159
.mypy_cache/

docs/mkdocs.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ docs_dir: src
99
nav:
1010
- Home:
1111
- libCacheSim Python: index.md
12-
- Getting Started:
13-
- getting_started/quickstart.md
12+
- Getting Started:
1413
- getting_started/installation.md
14+
- getting_started/quickstart.md
1515
- Examples:
1616
- examples/reader.md
1717
- examples/simulation.md
@@ -85,11 +85,14 @@ plugins:
8585
build: true
8686
nav_translations:
8787
Home: 首页
88-
Getting Started: 快速开始
88+
Getting Started: 入门指南
8989
User Guide: 用户指南
9090
Developer Guide: 开发者指南
9191
API Reference: API参考
9292
Examples: 使用示例
93+
FAQ: 常见问题
94+
General: 总览
95+
API Documentation: API 文档
9396

9497
markdown_extensions:
9598
- attr_list

0 commit comments

Comments
 (0)