Commit 808b8d0
committed
fix(metadata): preserve api/basename identifiers for root index files
When path is '/' (set by the ast generator for index.md files), the
derived api and basename values were empty strings. This broke all
downstream generators that rely on api/basename as file identifiers
(e.g. legacy-json writing index.json, legacy-json-all skipping the
index section, legacy-html writing index.html, etc.).
Add an 'index' fallback so that path='/' correctly maps to
api='index' and basename='index', matching the pre-existing behavior
for those identifiers.1 parent 9c9c7f9 commit 808b8d0
1 file changed
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
| 46 | + | |
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
| |||
83 | 84 | | |
84 | 85 | | |
85 | 86 | | |
86 | | - | |
| 87 | + | |
87 | 88 | | |
88 | 89 | | |
89 | 90 | | |
| |||
0 commit comments