Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HydePHP v1.3.0 - 2023-10-30 #581

Merged
merged 22 commits into from
Oct 30, 2023
Merged
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
40751ae
Merge pull request #1393 from hydephp/improve-source-file-creator-act…
invalid-email-address Oct 21, 2023
438508f
Merge pull request #1392 from hydephp/realtime-compiler-dashboard-imp…
invalid-email-address Oct 26, 2023
4893476
Merge pull request #1395 from hydephp/realtime-compiler-dashboard-imp…
invalid-email-address Oct 27, 2023
ffd197d
Merge pull request #1396 from hydephp/navigation-data-factory-cleanup
invalid-email-address Oct 27, 2023
d6208d7
Merge pull request #1398 from hydephp/custom-file-not-found-exception…
invalid-email-address Oct 27, 2023
10eb1a8
Merge changes from https://github.com/hydephp/develop/pull/1400
caendesilva Oct 27, 2023
e58871c
Merge pull request #1399 from hydephp/general-bugfixes
invalid-email-address Oct 27, 2023
2440025
Run tests with Junit reporting
caendesilva Oct 27, 2023
93f8af2
Merge branch 'master' into develop
caendesilva Oct 27, 2023
7f0a0c1
Merge changes from https://github.com/hydephp/develop/pull/1402
caendesilva Oct 27, 2023
7ffdd7f
Merge branch 'master' into develop
caendesilva Oct 27, 2023
d6bac3a
Merge pull request #1407 from hydephp/duplicate-navigation-items-shou…
invalid-email-address Oct 28, 2023
5a9ea3e
Merge pull request #1408 from hydephp/code-cleanup
invalid-email-address Oct 28, 2023
ddb3fa1
Merge pull request #1409 from hydephp/improve-featured-image-factory-…
invalid-email-address Oct 28, 2023
33d9388
Merge pull request #1410 from hydephp/code-quality
invalid-email-address Oct 28, 2023
2e55141
Merge pull request #1411 from hydephp/code-quality
invalid-email-address Oct 28, 2023
1a645df
Merge pull request #1412 from hydephp/set-build-flag-in-runtime-confi…
invalid-email-address Oct 28, 2023
0ec601c
Merge pull request #1413 from hydephp/refactor-colored-blockquote-int…
invalid-email-address Oct 29, 2023
c3504da
Merge pull request #1414 from hydephp/code-quality
invalid-email-address Oct 29, 2023
0724521
Merge pull request #1416 from hydephp/add-base-command-ask-for-string…
invalid-email-address Oct 29, 2023
55e1f18
Merge pull request #1417 from hydephp/code-quality
invalid-email-address Oct 29, 2023
e37fef9
Merge pull request #1421 from hydephp/release-v1.3.0
invalid-email-address Oct 30, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge pull request #1396 from hydephp/navigation-data-factory-cleanup
Break down complex helper method hydephp/develop@528cd86
  • Loading branch information
github-actions committed Oct 27, 2023
commit ffd197da642699b005b45d8b3b5a8425ed13208f
18 changes: 15 additions & 3 deletions src/Framework/Factories/NavigationDataFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,8 @@ protected function makeHidden(): bool
{
return $this->isInstanceOf(MarkdownPost::class)
|| $this->searchForHiddenInFrontMatter()
|| in_array($this->routeKey, Config::getArray('hyde.navigation.exclude', ['404']))
|| (! $this->isInstanceOf(DocumentationPage::class) && $this->pageIsInSubdirectory() && ($this->getSubdirectoryConfiguration() === 'hidden'))
&& (basename($this->identifier) !== 'index');
|| $this->isPageHiddenInNavigationConfiguration()
|| $this->isNonDocumentationPageInHiddenSubdirectory();
}

protected function makePriority(): int
Expand Down Expand Up @@ -119,6 +118,19 @@ private function searchForHiddenInFrontMatter(): ?bool
?? $this->invert($this->getMatter('navigation.visible'));
}

private function isPageHiddenInNavigationConfiguration(): ?bool
{
return in_array($this->routeKey, Config::getArray('hyde.navigation.exclude', ['404']));
}

private function isNonDocumentationPageInHiddenSubdirectory(): bool
{
return ! $this->isInstanceOf(DocumentationPage::class)
&& $this->pageIsInSubdirectory()
&& $this->getSubdirectoryConfiguration() === 'hidden'
&& basename($this->identifier) !== 'index';
}

private function searchForPriorityInFrontMatter(): ?int
{
return $this->getMatter('navigation.priority')
Expand Down