diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index db63d350..5b24a1c7 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -17,7 +17,7 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: shivammathur/setup-php@a36e1e52ff4a1c9e9c9be31551ee4712a6cb6bd0 + - uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php }} extensions: fileinfo, zip diff --git a/config/docs.php b/config/docs.php index c26d702e..fab400e9 100644 --- a/config/docs.php +++ b/config/docs.php @@ -30,7 +30,8 @@ // When using a grouped sidebar, should the groups be collapsible? 'collapsible' => true, - // Should the sidebar footer be shown? + // Should the sidebar footer be shown? You can also set this to a string + // of Markdown to show in the footer. Set to `false` to disable. 'footer' => true, ], @@ -43,10 +44,11 @@ | default to sort alphabetically. You can reorder the page identifiers | in the list below, and the links will get sorted in that order. | - | Internally, the items listed will get a position priority of 500 + the order its found in the list. - | Link items without an entry here will have fall back to the default priority of 999, putting them last. + | The items will get a priority of 500 plus the order its found in the list. + | Pages without a priority will fall back to the default priority of 999. | - | You can also set explicit priorities in front matter. + | You can also set explicit priorities in front matter or by specifying + | a value to the array key in the list to override the inferred value. | */ diff --git a/config/hyde.php b/config/hyde.php index f9126cb3..b05f8683 100644 --- a/config/hyde.php +++ b/config/hyde.php @@ -300,13 +300,17 @@ | | If you are looking to customize the main navigation menu, this is the place! | + | All these settings uses Route Keys to identify the page you want to configure. + | A route key is simply the URL path to the page, without the file extension. + | So `_site/posts/hello-world.html` has the route key 'posts/hello-world'. + | */ '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 should match the page's route key (slug). - // Lower values show up first in the menu. + // 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' => [ 'index' => 0, 'posts' => 10, @@ -314,13 +318,13 @@ ], // In case you want to customize the labels for the menu items, you can do so here. - // Simply add the route key (slug) as the key, and the label as the value. + // Simply add the route key as the array key, and the label as the value. 'labels' => [ 'index' => 'Home', 'docs/index' => 'Docs', ], - // These are the pages that should not show up in the navigation menu. + // These are the route keys of pages that should not show up in the navigation menu. 'exclude' => [ '404', ], @@ -414,6 +418,9 @@ // Should preview pages be saved to the output directory? 'save_preview' => true, + // Should the live edit feature be enabled? + 'live_edit' => env('SERVER_LIVE_EDIT', true), + // Configure the realtime compiler dashboard 'dashboard' => [ // Should the realtime compiler dashboard be enabled? diff --git a/resources/views/components/docs/sidebar-footer-text.blade.php b/resources/views/components/docs/sidebar-footer-text.blade.php index 4bafb848..6b49ca39 100644 --- a/resources/views/components/docs/sidebar-footer-text.blade.php +++ b/resources/views/components/docs/sidebar-footer-text.blade.php @@ -1,3 +1,7 @@
- Back to home page + @if(is_bool(config('docs.sidebar.footer', true))) + Back to home page + @else + {{ Hyde::markdown(config('docs.sidebar.footer')) }} + @endif
\ No newline at end of file diff --git a/resources/views/components/docs/sidebar-items.blade.php b/resources/views/components/docs/sidebar-items.blade.php index cb9669c9..4c26062c 100644 --- a/resources/views/components/docs/sidebar-items.blade.php +++ b/resources/views/components/docs/sidebar-items.blade.php @@ -11,7 +11,7 @@ @foreach ($sidebar->getGroups() as $group)