diff --git a/config/hyde.php b/config/hyde.php index 8d9c62357c5..4b224b922ae 100644 --- a/config/hyde.php +++ b/config/hyde.php @@ -332,40 +332,28 @@ | */ - 'navigation' => [ - // This configuration sets the priorities used to determine the order of the menu. - // The default values have been added below for reference and easy editing. - // The array key is the page's route key, the value is the priority. - // Lower values show up first in the menu. The default is 999. - 'order' => [ + 'navigation' => Navigation::configure() + ->order([ + // Override page priority order 'index' => 0, 'posts' => 10, 'docs/index' => 100, - ], - - // In case you want to customize the labels for the menu items, you can do so here. - // Simply add the route key as the array key, and the label as the value. - 'labels' => [ + ]) + ->labels([ + // Override page labels 'index' => 'Home', 'docs/index' => 'Docs', - ], - - // These are the route keys of pages that should not show up in the navigation menu. - 'exclude' => [ + ]) + ->exclude([ + // Exclude pages from the navigation '404', - ], - - // Any extra links you want to add to the navigation menu can be added here. - // To get started quickly, you can uncomment the defaults here. - // See the documentation link above for more information. - 'custom' => [ + ]) + ->custom([ + // Add custom items to the navigation menu // Navigation::item('https://github.com/hydephp/hyde', 'GitHub', 200), - ], - - // How should pages in subdirectories be displayed in the menu? - // You can choose between 'dropdown', 'flat', and 'hidden'. - 'subdirectory_display' => 'hidden', - ], + ]) + // Configure how subdirectories are displayed in the navigation + ->subdirectoryDisplay('hidden'), /* |-------------------------------------------------------------------------- diff --git a/packages/framework/config/hyde.php b/packages/framework/config/hyde.php index 8d9c62357c5..4b224b922ae 100644 --- a/packages/framework/config/hyde.php +++ b/packages/framework/config/hyde.php @@ -332,40 +332,28 @@ | */ - 'navigation' => [ - // This configuration sets the priorities used to determine the order of the menu. - // The default values have been added below for reference and easy editing. - // The array key is the page's route key, the value is the priority. - // Lower values show up first in the menu. The default is 999. - 'order' => [ + 'navigation' => Navigation::configure() + ->order([ + // Override page priority order 'index' => 0, 'posts' => 10, 'docs/index' => 100, - ], - - // In case you want to customize the labels for the menu items, you can do so here. - // Simply add the route key as the array key, and the label as the value. - 'labels' => [ + ]) + ->labels([ + // Override page labels 'index' => 'Home', 'docs/index' => 'Docs', - ], - - // These are the route keys of pages that should not show up in the navigation menu. - 'exclude' => [ + ]) + ->exclude([ + // Exclude pages from the navigation '404', - ], - - // Any extra links you want to add to the navigation menu can be added here. - // To get started quickly, you can uncomment the defaults here. - // See the documentation link above for more information. - 'custom' => [ + ]) + ->custom([ + // Add custom items to the navigation menu // Navigation::item('https://github.com/hydephp/hyde', 'GitHub', 200), - ], - - // How should pages in subdirectories be displayed in the menu? - // You can choose between 'dropdown', 'flat', and 'hidden'. - 'subdirectory_display' => 'hidden', - ], + ]) + // Configure how subdirectories are displayed in the navigation + ->subdirectoryDisplay('hidden'), /* |--------------------------------------------------------------------------