Skip to content

Commit 2cfd0f5

Browse files
committed
Merge branch 'master' of github.com:hydephp/develop
2 parents 37168d4 + 92adcf5 commit 2cfd0f5

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

packages/framework/src/Framework/Factories/NavigationDataFactory.php

+8-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ private function getDocumentationPageGroup(): ?string
139139
// then we can use that as the category name.
140140
? Str::before($this->identifier, '/')
141141
// Otherwise, we look in the front matter.
142-
: $this->matter('navigation.group', 'other');
142+
: $this->findGroupFromMatter();
143143
}
144144

145145
protected function searchForLabelInConfig(): ?string
@@ -160,4 +160,11 @@ protected function isInstanceOf(string $class): bool
160160
{
161161
return is_a($this->pageClass, $class, true);
162162
}
163+
164+
protected function findGroupFromMatter(): mixed
165+
{
166+
return $this->matter('navigation.group')
167+
?? $this->matter('navigation.category')
168+
?? 'other';
169+
}
163170
}

0 commit comments

Comments
 (0)