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

Overhaul the navigation menu to add configuration options #27

Merged
merged 4 commits into from
Mar 20, 2022

Conversation

caendesilva
Copy link
Member

@caendesilva caendesilva commented Mar 20, 2022

Abstract

In the spirit of convention over configuration, most features added here don't majorly impact the default behavior of the app (with the exception of automatically hiding 404 pages). However, it brings several configuration options such as custom navigation menu links (thus removing the need of redirect hacks), as well as a blacklist (which is what hides the 404 by default).

Fixes

This PR fixes the following,

Features

Custom navigation links

The custom navigation links can also be used to override and reorder the automatic links.

The links are added in the config/hyde.php file, and the syntax for adding custom links is documented in the config.

// External link
[
    'title' => 'GitHub',
    'destination' => 'https://github.com/hydephp/hyde',
    'priority' => 1200,
],

// Internal link (Hyde automatically resolves relative paths)
[
    'title' => 'Featured Blog Post',
    'slug' => 'posts/hello-world',
    // The 'priority' is not required.
]

Changes

The deprecated MakeNavigationLinkCommand has been removed as it is no longer needed.

@caendesilva caendesilva merged commit 828b957 into master Mar 20, 2022
@caendesilva caendesilva deleted the navigation-menu-fixes branch March 20, 2022 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant