Skip to content

Commit

Permalink
Allow documentation sidebar header name to be changed
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed May 2, 2022
1 parent 4c79af0 commit 7c50b4f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
12 changes: 12 additions & 0 deletions config/hyde.php
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,18 @@
'404',
],

/*
|--------------------------------------------------------------------------
| Documentation Sidebar Header Name
|--------------------------------------------------------------------------
|
| By default, the sidebar title shown in the documentation page layouts uses
| the app name suffixed with "docs". You can change it with this setting.
|
*/

'docsSidebarHeaderTitle' => config('app.name') . ' Docs',

/*
|--------------------------------------------------------------------------
| Documentation Site Output Directory
Expand Down
5 changes: 3 additions & 2 deletions resources/views/components/docs/sidebar-header.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
<h2 class="font-bold text-gray-700 hover:text-gray-900 dark:text-gray-200 w-fit">
@if(Hyde::docsIndexPath() !== false)
<a href="{{ basename(Hyde::docsIndexPath()) }}">
{{ config('hyde.name') }} Docs
{{ config('hyde.docsSidebarHeaderTitle', 'Documentation') }}

</a>
@else
{{ config('hyde.name') }} Docs
{{ config('hyde.docsSidebarHeaderTitle', 'Documentation') }}
@endif
</h2>
<div class="ml-auto">
Expand Down

0 comments on commit 7c50b4f

Please sign in to comment.