File tree Expand file tree Collapse file tree 2 files changed +5
-8
lines changed
packages/framework/src/Framework/Features/Navigation Expand file tree Collapse file tree 2 files changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -89,6 +89,11 @@ protected function canAddRoute(Route $route): bool
8989 return false ;
9090 }
9191
92+ if ($ this ->generatesSidebar ) {
93+ // Since the index page is linked in the header, we don't want it in the sidebar
94+ return ! $ route ->is (DocumentationPage::homeRouteName ());
95+ }
96+
9297 return true ;
9398 }
9499
Original file line number Diff line number Diff line change 44
55namespace Hyde \Framework \Features \Navigation ;
66
7- use Hyde \Support \Models \Route ;
87use Hyde \Pages \DocumentationPage ;
98
109use function collect ;
@@ -37,13 +36,6 @@ protected function generate(): void
3736 $ this ->sortSidebarGroupsByLowestPriority ();
3837 }
3938
40- protected function canAddRoute (Route $ route ): bool
41- {
42- return parent ::canAddRoute ($ route )
43- // Since the index page is linked in the header, we don't want it in the sidebar
44- && ! $ route ->is (DocumentationPage::homeRouteName ());
45- }
46-
4739 protected function sortSidebarGroupsByLowestPriority (): void
4840 {
4941 // While the items accessor sorts the items upon retrieval,
You can’t perform that action at this time.
0 commit comments