Skip to content

Commit

Permalink
Merge helper method into new code location
Browse files Browse the repository at this point in the history
Merges f612126
  • Loading branch information
caendesilva committed Apr 30, 2024
1 parent eb81e60 commit b330ff5
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,17 @@ protected function usesGroups(): bool

return $this->routes->first(fn (Route $route): bool => filled($route->getPage()->navigationMenuGroup())) !== null;
} else {
return Config::getString('hyde.navigation.subdirectories', 'hidden') === 'dropdown';
return Config::getString('hyde.navigation.subdirectories', 'hidden') === 'dropdown' || $this->hasGroupExplicitlySetInFrontMatter();
}
}

private function hasGroupExplicitlySetInFrontMatter(): bool
{
return $this->routes->contains(function (Route $item): bool {
return ($item->getPage()->navigationMenuGroup() !== null) && (! $item->getPage() instanceof DocumentationPage);
});
}

protected function canAddRoute(Route $route): bool
{
if (! $route->getPage()->showInNavigation()) {
Expand Down

0 comments on commit b330ff5

Please sign in to comment.