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

Add config option to customize automatic sidebar navigation group names #1481

Merged

Conversation

caendesilva
Copy link
Member

@caendesilva caendesilva commented Nov 27, 2023

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!

// Filepath: config/docs.php

'sidebar_group_labels' => [
    'questions-and-answers' => 'Questions & Answers',
],

@caendesilva caendesilva linked an issue Nov 27, 2023 that may be closed by this pull request
Copy link

codecov bot commented Nov 27, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (48e02b8) 100.00% compared to head (09a587a) 100.00%.

Additional details and impacted files
@@              Coverage Diff              @@
##              master     #1481     +/-   ##
=============================================
  Coverage     100.00%   100.00%             
- Complexity      1733      3468   +1735     
=============================================
  Files            180       360    +180     
  Lines           4700      9404   +4704     
=============================================
+ Hits            4700      9404   +4704     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

caendesilva referenced this pull request Nov 27, 2023
See #1467 (using camelCase as that's what other page schemas use)
@caendesilva caendesilva changed the title Add a way to customize automatic sidebar navigation group names Add config option to customize automatic sidebar navigation group names Nov 27, 2023
@caendesilva caendesilva force-pushed the customizable-automatic-sidebar-navigation-group-names branch from cc4cb1d to 576d011 Compare November 27, 2023 18:41
@caendesilva caendesilva marked this pull request as ready for review November 27, 2023 18:46
@caendesilva caendesilva merged commit 108ba0f into master Nov 27, 2023
21 checks passed
@caendesilva caendesilva deleted the customizable-automatic-sidebar-navigation-group-names branch November 27, 2023 18:46
caendesilva added a commit to hydephp/hydephp.com that referenced this pull request Nov 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a way to customize automatic sidebar navigation group names
1 participant