diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 24b384a5e64..7309c20bf19 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -12,6 +12,7 @@ This serves two purposes: ### Added - Adds a new fancy output for the realtime compiler serve command in https://github.com/hydephp/develop/pull/1444 - Added support for dot notation in the Yaml configuration files in https://github.com/hydephp/develop/pull/1478 +- Added a config option to customize automatic sidebar navigation group names in https://github.com/hydephp/develop/pull/1481 ### Changed - The `docs.sidebar.footer` config option now accepts a Markdown string to replace the default footer in https://github.com/hydephp/develop/pull/1477 diff --git a/docs/creating-content/documentation-pages.md b/docs/creating-content/documentation-pages.md index a2e36adb328..5a842ff183b 100644 --- a/docs/creating-content/documentation-pages.md +++ b/docs/creating-content/documentation-pages.md @@ -234,6 +234,23 @@ Link items without an entry here will have fall back to the default priority of See [the chapter in the customization page](customization#navigation-menu--sidebar) for more details.
+### Automatic sidebar group labels + +When using the automatic sidebar grouping feature (based on subdirectories), the titles of the groups are generated from the directory names. +If these are not to your liking, for example if you need to use special characters, you can override them in the Docs configuration file. +The array key is the directory name, and the value is the label. + +Please note that this option is not added to the config file by default, as it's not a super common use case. No worries though, just add the following yourself! + +```php +// Filepath: config/docs.php + +'sidebar_group_labels' => [ + 'questions-and-answers' => 'Questions & Answers', +], +``` + + ### Table of contents settings In the `config/docs.php` file you can configure the behavior, content, and the look and feel of the sidebar table of contents. diff --git a/packages/framework/resources/views/components/docs/sidebar-items.blade.php b/packages/framework/resources/views/components/docs/sidebar-items.blade.php index cb9669c9c11..4c26062cf9f 100644 --- a/packages/framework/resources/views/components/docs/sidebar-items.blade.php +++ b/packages/framework/resources/views/components/docs/sidebar-items.blade.php @@ -11,7 +11,7 @@ @foreach ($sidebar->getGroups() as $group)