Commit 5235a1c
committed
feat: make the navbar self-describing for remote clients
navbar.json identified each chapter by id and display name only, while its
documents are generated into a slug directory. As a local bundle a client could
carry its own ordered list of directories; as a remote API there was no way to
build a URL from the navbar at all, and any change to a chapter's nav_order
would silently repoint a hardcoded list at the wrong chapter.
Each chapter now carries the directory it was generated into, so a client can
request "<base>/<path>/0.json" for a chapter index and "<base>/<path>/<id>.json"
for a section. The field is additive; existing consumers ignore it.
Verified that every URL derivable from navbar.json resolves to valid JSON, and
that no generated document is unreachable from it.1 parent e391ac8 commit 5235a1c
1 file changed
Lines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
71 | 76 | | |
72 | 77 | | |
73 | 78 | | |
74 | 79 | | |
75 | 80 | | |
| 81 | + | |
76 | 82 | | |
77 | 83 | | |
78 | 84 | | |
| |||
0 commit comments