Commit 89c4049
Skip auto-navigation population when template defines explicit sections
When a MintlifyTemplate specifies Tabs, Anchors, Dropdowns, or Products
directly in the <Navigation> XML, the renderer was still calling
PopulateNavigationFromPath which unconditionally initialized Pages and
auto-discovered MDX files from disk. This produced a spurious
"navigation.pages" block alongside the explicit "navigation.tabs" in the
output docs.json.
Fix by checking for explicit navigation sections after loading the
template config and skipping both PopulateNavigationFromPath and
BuildNavigationStructure when they are present. The NavigationType-based
auto-generation path (where Pages are discovered then moved to a Tab by
ApplyNavigationType) is unaffected.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 3350374 commit 89c4049
1 file changed
Lines changed: 21 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
147 | 160 | | |
148 | 161 | | |
149 | 162 | | |
| |||
0 commit comments