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

HydePHP v2.x Development #1565

Draft
wants to merge 4,381 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
4381 commits
Select commit Hold shift + click to select a range
0ff87fd
First pass at collecting and formatting publish paths
caendesilva Dec 10, 2024
73bcf9f
Cleanup code
caendesilva Dec 10, 2024
ff5757f
Prompt for files
caendesilva Dec 10, 2024
6025e57
Use Laravel Prompts multiselect
caendesilva Dec 10, 2024
b6eba4a
Cleanup and move up output
caendesilva Dec 10, 2024
98e4b16
Filter the files to only include the selected ones
caendesilva Dec 10, 2024
6607d3d
Publish the files
caendesilva Dec 10, 2024
cea2f6c
Display how to select/unselect all at once
caendesilva Dec 10, 2024
e737d1f
Create InteractivePublishCommandHelper.php
caendesilva Dec 10, 2024
1b93233
Create InteractivePublishCommandHelperTest.php
caendesilva Dec 10, 2024
d27fae8
Add test crosslink
caendesilva Dec 10, 2024
e04400a
Support all groups
caendesilva Dec 10, 2024
f9bb56a
Add todo
caendesilva Dec 10, 2024
3f406ad
Tweak setup
caendesilva Dec 10, 2024
04813da
Create helper instance
caendesilva Dec 10, 2024
15b67aa
Introduce local variable
caendesilva Dec 10, 2024
5589e36
Mark helper as internal
caendesilva Dec 10, 2024
6d7810a
Move method to helper
caendesilva Dec 10, 2024
32105b2
Revert "Move method to helper"
caendesilva Dec 10, 2024
72b4b11
Move logic to helper
caendesilva Dec 10, 2024
2faf686
Refactor the extracted class
caendesilva Dec 10, 2024
26eff2f
Refactor so output is handled in command
caendesilva Dec 11, 2024
b6010c2
Refactor to initialise all data in constructor
caendesilva Dec 11, 2024
acaf3f3
Make it clearer where data is initialized
caendesilva Dec 11, 2024
093c96e
Cleanup code
caendesilva Dec 11, 2024
2f000ba
Refactor data retrieval to clean up constructor
caendesilva Dec 11, 2024
cd6dbb0
Rename properties to indicate they are directories
caendesilva Dec 11, 2024
ecc8725
Use array facade instead of unnecessary collections
caendesilva Dec 11, 2024
9c9b113
Extract helper method
caendesilva Dec 11, 2024
50f8362
Formatting
caendesilva Dec 11, 2024
3330f3a
Extract helper method and add more array types
caendesilva Dec 11, 2024
7c68954
Change variable used to match signature
caendesilva Dec 11, 2024
179a6d3
Fix formatting
caendesilva Dec 11, 2024
c60a240
Split out output handler to void handle method
caendesilva Dec 11, 2024
8df8040
Add base test setups
caendesilva Dec 11, 2024
c28a233
Disable interactive publishing on Windows
caendesilva Dec 22, 2024
27d3cc2
Create ConsoleHelper.php
caendesilva Dec 22, 2024
4e59a21
Mark helper as internal
caendesilva Dec 22, 2024
2c221b1
Code coverage ignore helper
caendesilva Dec 22, 2024
b9a4ed8
Add mocking scaffolding
caendesilva Dec 22, 2024
443a1a8
Add and use mockable Windows detection helper
caendesilva Dec 22, 2024
03bcc03
Create mockable helper for multiselect
caendesilva Dec 22, 2024
4f90765
Create first tests
caendesilva Dec 22, 2024
366c42d
Mock test state
caendesilva Dec 22, 2024
f64240b
Refactor to add check earlier so we can fail command
caendesilva Dec 22, 2024
86ac4a6
Clean up after test
caendesilva Dec 22, 2024
0200cc6
Cleanup test
caendesilva Dec 22, 2024
6824637
Also bail if the stream is not interactive
caendesilva Dec 22, 2024
e72985a
Revert "Also bail if the stream is not interactive"
caendesilva Dec 22, 2024
802a9ab
Mock the application
caendesilva Dec 22, 2024
b3faee7
Annotate literal parameters
caendesilva Dec 22, 2024
7b4003d
Annotate array types
caendesilva Dec 22, 2024
6fa6b35
Implement the unit test
caendesilva Dec 22, 2024
31a1400
Cleanup code and use real app
caendesilva Dec 22, 2024
540c0c4
Add final unit test
caendesilva Dec 22, 2024
2438471
Refactor to mock by default
caendesilva Dec 22, 2024
8e45658
Simplify setup
caendesilva Dec 22, 2024
4394f66
Add testing helper
caendesilva Dec 23, 2024
9f37161
Use proper single file pluralization
caendesilva Dec 23, 2024
f71272d
More Laravely formatting
caendesilva Dec 23, 2024
7895391
Extract helper method
caendesilva Dec 23, 2024
dbb49aa
Clearer helper method name
caendesilva Dec 23, 2024
945d5f1
Inline local variable
caendesilva Dec 23, 2024
988a1dc
Helper method
caendesilva Dec 23, 2024
a799498
Inline variable
caendesilva Dec 23, 2024
63c8b61
Implement dynamic formatting
caendesilva Dec 23, 2024
95a305c
Remove inlined helper method
caendesilva Dec 23, 2024
84b5459
Go really crazy with the formatting
caendesilva Dec 23, 2024
1cabc8b
Expect smarter formatting
caendesilva Dec 23, 2024
e9a1dda
Cleanup formatting
caendesilva Dec 24, 2024
38d8a21
Create ConsoleHelperTest.php
caendesilva Dec 24, 2024
65ebd7e
Add regression test
caendesilva Dec 24, 2024
e9bee64
Cleanup code
caendesilva Dec 24, 2024
5143c0b
Clean up formatting
caendesilva Dec 24, 2024
88d7545
Don't trigger interactive if "all" is selected
caendesilva Dec 25, 2024
88b9713
Cleanup code with expanded func get args
caendesilva Dec 25, 2024
5791d29
Use Laravel Prompts for initial select
caendesilva Dec 25, 2024
c48d2de
Remove resolved todo
caendesilva Dec 25, 2024
21f7f54
Annotate array types
caendesilva Dec 25, 2024
c5f57d4
Formatting
caendesilva Dec 25, 2024
b2f9692
Use proper Laravel Prompts fallback
caendesilva Dec 25, 2024
56895f4
Fix formatting
caendesilva Dec 25, 2024
9538c71
Add todo
caendesilva Dec 25, 2024
24b5838
Normalize implementation to not call vendor command
caendesilva Dec 25, 2024
5183876
Support single file
caendesilva Dec 25, 2024
138c4db
Formatting
caendesilva Dec 25, 2024
4ad163b
Update PublishViewsCommand.php
caendesilva Dec 25, 2024
4b08069
Use proper fallback syntax
caendesilva Dec 25, 2024
50f078b
Create ViewPublishGroup.php
caendesilva Dec 25, 2024
e7b6e9c
Create internal helper class for wrapping publishable files
caendesilva Dec 25, 2024
e49769d
Cleanup formatting
caendesilva Dec 25, 2024
ffad46b
Fix formatting
caendesilva Dec 25, 2024
c73740f
Construct directory
caendesilva Dec 25, 2024
a77da56
Formatting
caendesilva Dec 25, 2024
54c8891
Declare options using helper
caendesilva Dec 25, 2024
3d7dff9
Add helper to get the map of all publishable file paths
caendesilva Dec 25, 2024
e08e68c
Map to keys
caendesilva Dec 25, 2024
542a2f5
Use object access
caendesilva Dec 25, 2024
bc4e9a4
Unwrap curly braces
caendesilva Dec 25, 2024
881960a
Add spacing
caendesilva Dec 25, 2024
9c95612
More semantic implementation with collect call
caendesilva Dec 25, 2024
14ce32d
Refactor and cleanup
caendesilva Dec 25, 2024
4b4f439
Move down prepend
caendesilva Dec 25, 2024
ddb86dd
Validate selection
caendesilva Dec 25, 2024
5b6f41f
Merge allowed keys
caendesilva Dec 25, 2024
f915c1d
Inline variable
caendesilva Dec 25, 2024
5bce274
Inline method
caendesilva Dec 25, 2024
a64767d
Return with better error instead of throw
caendesilva Dec 25, 2024
fdcb53c
Flip values
caendesilva Dec 25, 2024
7890671
Trim the prefix we don't need here
caendesilva Dec 25, 2024
5f82f32
Convert the arrow function to a traditional closure
caendesilva Dec 25, 2024
8d95940
Fix formatting
caendesilva Dec 25, 2024
87bbb3d
Should not need string cast
caendesilva Dec 25, 2024
ac4ebcf
Fallback to all earlier
caendesilva Dec 25, 2024
9ecb4be
Only support groups to publish here
caendesilva Dec 25, 2024
d9f59e0
Merge all paths to publish
caendesilva Dec 25, 2024
3b30a4f
Buffer files to publish
caendesilva Dec 25, 2024
860e262
Remove unused method
caendesilva Dec 25, 2024
f1ceaef
Normalize format
caendesilva Dec 25, 2024
0e812af
Algorithm to find the most specific common path
caendesilva Dec 25, 2024
1ec031a
Refactor for the new publisher system
caendesilva Dec 25, 2024
4f982fd
Make array writable
caendesilva Dec 25, 2024
9917956
Remove unused methods
caendesilva Dec 25, 2024
648e3c4
Use instance data
caendesilva Dec 25, 2024
c50f60a
Simplify publishing handler
caendesilva Dec 25, 2024
a7a6652
Formatting
caendesilva Dec 25, 2024
ee62aaf
Remove todo as we overwrite files
caendesilva Dec 25, 2024
8697255
Get selected files from instance
caendesilva Dec 25, 2024
6ff9b2c
Use dynamic base directory
caendesilva Dec 25, 2024
df24553
Publish files
caendesilva Dec 25, 2024
b69a93a
Write output
caendesilva Dec 25, 2024
9672a0b
Fix source not being used
caendesilva Dec 25, 2024
05d4781
Helper to only publish the selected files
caendesilva Dec 25, 2024
e6d03fe
Cleanup code
caendesilva Dec 25, 2024
5c8cec8
Interactively publish selected files
caendesilva Dec 25, 2024
aebd65a
Cleanup code
caendesilva Dec 25, 2024
93af32e
Remove unused method
caendesilva Dec 25, 2024
7b1b7b0
Remove unused import
caendesilva Dec 25, 2024
6406e7c
Improve formatting
caendesilva Dec 25, 2024
8f1790c
Simplify 'if'
caendesilva Dec 25, 2024
5f19c37
Extract helper method
caendesilva Dec 25, 2024
1624692
Extract helper method
caendesilva Dec 25, 2024
0966cc7
Cleanup code
caendesilva Dec 25, 2024
54c125f
Remove extra newline
caendesilva Dec 25, 2024
991ffe1
Print more helpful output
caendesilva Dec 25, 2024
6d5606f
Add magic key to select all
caendesilva Dec 25, 2024
215d75c
No need to write we select all here
caendesilva Dec 25, 2024
4be8d42
Move up method in source
caendesilva Dec 25, 2024
a628959
Fix parameter name
caendesilva Dec 25, 2024
e54e782
No longer need hint
caendesilva Dec 25, 2024
5df46b5
Use search instead of select
caendesilva Dec 25, 2024
3f95c4d
Revert "Use search instead of select"
caendesilva Dec 25, 2024
004b7de
Extract helper method
caendesilva Dec 25, 2024
baf1571
Fix formatting
caendesilva Dec 25, 2024
20d879c
Cleanup control flow
caendesilva Dec 25, 2024
93fba2c
Ignore coverage for Laravel Prompts patch
caendesilva Dec 25, 2024
592c2eb
Dynamic label
caendesilva Dec 25, 2024
d51c768
Revert "Dynamic label"
caendesilva Dec 25, 2024
793d27c
Use more semantic helper
caendesilva Dec 25, 2024
d54b2b9
Formatting
caendesilva Dec 25, 2024
da40f5f
Rewrite unit test for new scope
caendesilva Dec 25, 2024
134b4e9
Remove experimental marker
caendesilva Dec 25, 2024
2025cf6
Fix formatting
caendesilva Dec 25, 2024
51358b1
Make helper public
caendesilva Dec 25, 2024
574fb8b
Use more realistic dataset
caendesilva Dec 25, 2024
e52b1f9
Test more cases
caendesilva Dec 25, 2024
0f3fd96
Test the base directory helper
caendesilva Dec 25, 2024
7c21ab5
Fix formatting
caendesilva Dec 25, 2024
796bae1
Cleanup and refactor method
caendesilva Dec 25, 2024
2529630
Reformat to ternary return
caendesilva Dec 25, 2024
1accd03
Merge declaration
caendesilva Dec 25, 2024
f9d36f6
Remove multi select mocker we are no longer using
caendesilva Dec 25, 2024
68b584f
Inline variable
caendesilva Dec 25, 2024
06aad10
Refactor to move up output
caendesilva Dec 25, 2024
80dbaec
Inline local variable
caendesilva Dec 25, 2024
ca97255
Tweak helper methods
caendesilva Dec 25, 2024
842c3d8
Fix logic
caendesilva Dec 25, 2024
7023dea
Check the input
caendesilva Dec 25, 2024
d466607
Check using helper
caendesilva Dec 25, 2024
1248247
Update the test
caendesilva Dec 25, 2024
7fee865
Remove annotation we don't need
caendesilva Dec 26, 2024
586068f
Handle output in main command body
caendesilva Dec 26, 2024
970b4c3
Return publisher to handle all output in main command body
caendesilva Dec 26, 2024
5570d91
Print the published group
caendesilva Dec 26, 2024
31fcc3a
Check group is not all
caendesilva Dec 26, 2024
c7f1eac
Don't print selected when using argument
caendesilva Dec 26, 2024
b829a82
Instead of printing count, assume we did what the user wanted
caendesilva Dec 26, 2024
0ab7e8c
Null all group
caendesilva Dec 26, 2024
c2002df
Remove unused variable
caendesilva Dec 26, 2024
3c708b9
Remove unused method
caendesilva Dec 26, 2024
50c55eb
Replace ternary return with match returns
caendesilva Dec 26, 2024
bc5fb30
Print the file count
caendesilva Dec 26, 2024
6bc6030
Add testing helper to disable prompts
caendesilva Dec 26, 2024
78e73d7
Move up variable declaration
caendesilva Dec 26, 2024
19d6e36
Use local variable
caendesilva Dec 26, 2024
460bd1f
Invert local data flow
caendesilva Dec 26, 2024
413e777
Remove null support as real code is never null
caendesilva Dec 26, 2024
763662e
Fix wrong comparison
caendesilva Dec 26, 2024
7bbdc49
Move down formatting
caendesilva Dec 26, 2024
b6fc64c
Dynamic noun modifiers
caendesilva Dec 26, 2024
10c0fde
Introduce local variable
caendesilva Dec 26, 2024
def449a
Fix formatting
caendesilva Dec 26, 2024
ea2dc68
Test covers helper
caendesilva Dec 26, 2024
eda8e34
Remove periods
caendesilva Dec 26, 2024
ef11340
Reimplement the test for base usages
caendesilva Dec 26, 2024
3a9591c
Test with interactive output
caendesilva Dec 26, 2024
0a8e97d
Add hacky workaround for https://github.com/laravel/prompts/issues/158
caendesilva Dec 26, 2024
a527e30
Apply fixes from StyleCI
StyleCIBot Dec 26, 2024
4236205
Update tests for added parameter
caendesilva Dec 26, 2024
3abd5bc
Remove code coverage ignore
caendesilva Dec 26, 2024
bbea834
Set mock through container
caendesilva Dec 26, 2024
24bf9ea
Cleanup formatting
caendesilva Dec 26, 2024
c0683c3
Test all interactive selection paths
caendesilva Dec 26, 2024
ba6d1b6
Extract helper method and cleanup code
caendesilva Dec 26, 2024
e9fbb80
Use more explicit disabler
caendesilva Dec 26, 2024
826779a
Test with the group question
caendesilva Dec 26, 2024
e47239a
Change comment text
caendesilva Dec 26, 2024
101d398
Create ViewPublishGroupTest.php
caendesilva Dec 26, 2024
d5d36af
Call method on static provider
caendesilva Dec 26, 2024
d8192c7
Use static instead of self
caendesilva Dec 26, 2024
dfca559
Create setup for mocking the provider
caendesilva Dec 26, 2024
ad57a2e
Mock paths to publish based on real output
caendesilva Dec 26, 2024
2a8540f
Reorder helper classes
caendesilva Dec 26, 2024
ebe07f8
Assert from helper class
caendesilva Dec 26, 2024
4a7229a
Simplify test passer
caendesilva Dec 26, 2024
f346f16
Cleanup
caendesilva Dec 26, 2024
c272bbf
Import class
caendesilva Dec 26, 2024
5010001
Draft initial test
caendesilva Dec 26, 2024
3855c86
Mock file finder
caendesilva Dec 26, 2024
0afe4ab
Assert all properties
caendesilva Dec 26, 2024
adf92fc
Test custom names and descriptions
caendesilva Dec 26, 2024
49eee7e
Use static instead of self
caendesilva Dec 26, 2024
b701c32
Clean up formatting
caendesilva Dec 26, 2024
7199591
Fix paths needing to be dynamic for monorepo
caendesilva Dec 26, 2024
93ff4eb
Test we can get the publishable files map
caendesilva Dec 26, 2024
9936d17
Test does not need config
caendesilva Dec 26, 2024
b9b038b
Should not be singleton
caendesilva Dec 26, 2024
88d0ea4
Run more tests on the 2.x branch
caendesilva Dec 28, 2024
2d74f49
Merge branch '2.x-dev' into interactive-component-publisher-command
caendesilva Dec 28, 2024
b9df42b
Apparently faked prompts can't run on Windows
caendesilva Dec 28, 2024
fc972d5
Annotate array types
caendesilva Dec 28, 2024
2650e64
Add missing closure type
caendesilva Dec 28, 2024
a07d1ed
Add array cast
caendesilva Dec 28, 2024
724362b
Fix default for non-interactive mode
caendesilva Dec 29, 2024
e91f050
Revert "Fix default for non-interactive mode"
caendesilva Dec 29, 2024
c74b8ba
Fall back naught value to all
caendesilva Dec 29, 2024
ba2c0b6
Don't show feedback when prompts are not used
caendesilva Dec 29, 2024
09c668e
Update customization.md
caendesilva Dec 29, 2024
68aec1e
Update RELEASE_NOTES.md
caendesilva Dec 29, 2024
5928843
Merge pull request #2062 from hydephp/interactive-component-publisher…
caendesilva Dec 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
37 changes: 1 addition & 36 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,41 +109,6 @@ jobs:
run: php monorepo/scripts/tests/${{ matrix.script }}.php


build-hydefront-assets:

runs-on: ubuntu-latest
needs: run-smoke-tests

steps:
- uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
cache: 'npm'

- name: Install Node.js dependencies
working-directory: 'packages/hydefront'
run: npm ci

- name: Build assets for production
working-directory: 'packages/hydefront'
run: npm run prod

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: 'hydefront'
path: 'packages/hydefront/dist'

- name: Commit changes
uses: EndBug/add-and-commit@v9
with:
add: 'packages/hydefront/dist'
message: 'Compile HydeFront assets for production'
new_branch: compile-hydefront


build-tailwindcss:

runs-on: ubuntu-latest
Expand All @@ -164,7 +129,7 @@ jobs:
run: sed -i 's/\.\/vendor\/hyde\/framework\/resources\/views\/\*\*\/\*\.blade\.php/\.\/packages\/framework\/resources\/views\/\*\*\/\*\.blade\.php/' tailwind.config.js

- name: Build assets for production
run: npm run prod
run: npm run build

- name: Copy compiled app.css file to HydeFront dist folder
run: cp _media/app.css packages/hydefront/dist/app.css
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/end-to-end-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
run: vendor/bin/pest --stop-on-failure

- name: Prepare the Environment
run: echo -e "APP_URL=http://localhost:8080 \nDUSK_ENABLED=true\nSERVER_DASHBOARD=false" > .env
run: echo -e "APP_URL=http://localhost:8080 \nDUSK_ENABLED=true\nSERVER_DASHBOARD=false\nSERVER_SAVE_PREVIEW=true" > .env

- name: Upgrade Chrome Driver
run: php hyde dusk:chrome-driver `/opt/google/chrome/chrome --version | cut -d " " -f3 | cut -d "." -f1`
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/matrix-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Matrix Tests

on:
pull_request:
branches: [ "master" ]
branches: [ "master", "2.x-dev" ]
paths:
- 'app/**'
- 'packages/**'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: 🔎 Static Analysis

on:
pull_request:
branches: [ "master" ]
branches: [ "master", "2.x-dev" ]

jobs:

Expand Down
2 changes: 2 additions & 0 deletions .phpstorm.meta.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,7 @@
namespace PHPSTORM_META {
override(\app(0), map([
'hyde' => \Hyde\Foundation\HydeKernel::class,
'navigation.main' => \Hyde\Framework\Features\Navigation\MainNavigationMenu::class,
'navigation.sidebar' => \Hyde\Framework\Features\Navigation\DocumentationSidebar::class,
]));
}
676 changes: 638 additions & 38 deletions RELEASE_NOTES.md

Large diffs are not rendered by default.

9 changes: 7 additions & 2 deletions _ide_helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,25 @@
/** @var string $routeKey The route key for the page being compiled/previewed */
$routeKey = \Hyde\Support\Facades\Render::getRouteKey();

// Variables available only to some page types

/** @var \Hyde\Framework\Features\Navigation\DocumentationSidebar $sidebar */
$sidebar = app('navigation.sidebar');

// Facades (aliased in app/config.php)

/** @mixin \Hyde\Foundation\HydeKernel */
class Hyde extends \Hyde\Hyde {}
class Site extends \Hyde\Facades\Site {}
class Meta extends \Hyde\Facades\Meta {}
/** @mixin \Hyde\Framework\Services\AssetService */
class Asset extends \Hyde\Facades\Asset {}
class Author extends \Hyde\Facades\Author {}
class Features extends \Hyde\Facades\Features {}
class Config extends \Hyde\Facades\Config {}
class Vite extends \Hyde\Facades\Vite {}
/** @mixin \Illuminate\Filesystem\Filesystem */
class Filesystem extends \Hyde\Facades\Filesystem {}
class DataCollections extends \Hyde\Support\DataCollections {}
class DataCollection extends \Hyde\Support\DataCollection {}
class Includes extends \Hyde\Support\Includes {}
/** @mixin \Hyde\Foundation\Kernel\RouteCollection */
class Routes extends \Hyde\Foundation\Facades\Routes {}
Expand Down
5 changes: 1 addition & 4 deletions _media/app.css

Large diffs are not rendered by default.

7 changes: 6 additions & 1 deletion app/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
Hyde\Foundation\Providers\ConfigurationServiceProvider::class,
Hyde\Framework\HydeServiceProvider::class,
Hyde\Foundation\Providers\ViewServiceProvider::class,
Hyde\Foundation\Providers\NavigationServiceProvider::class,
Hyde\Console\ConsoleServiceProvider::class,
],

Expand All @@ -91,18 +92,22 @@
'Hyde' => Hyde\Hyde::class,
'Site' => \Hyde\Facades\Site::class,
'Meta' => \Hyde\Facades\Meta::class,
'Vite' => \Hyde\Facades\Vite::class,
'Asset' => \Hyde\Facades\Asset::class,
'Author' => \Hyde\Facades\Author::class,
'HydeFront' => \Hyde\Facades\HydeFront::class,
'Features' => \Hyde\Facades\Features::class,
'Config' => \Hyde\Facades\Config::class,
'Filesystem' => \Hyde\Facades\Filesystem::class,
'Navigation' => \Hyde\Facades\Navigation::class,
'Routes' => \Hyde\Foundation\Facades\Routes::class,
'HtmlPage' => \Hyde\Pages\HtmlPage::class,
'BladePage' => \Hyde\Pages\BladePage::class,
'MarkdownPage' => \Hyde\Pages\MarkdownPage::class,
'MarkdownPost' => \Hyde\Pages\MarkdownPost::class,
'DocumentationPage' => \Hyde\Pages\DocumentationPage::class,
'DataCollections' => \Hyde\Support\DataCollections::class,
'MediaFile' => \Hyde\Support\Filesystem\MediaFile::class,
'DataCollection' => \Hyde\Support\DataCollection::class,
'Includes' => \Hyde\Support\Includes::class,
'Feature' => \Hyde\Enums\Feature::class,
],
Expand Down
84 changes: 42 additions & 42 deletions config/docs.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,49 +30,49 @@
// When using a grouped sidebar, should the groups be collapsible?
'collapsible' => true,

// 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,
],

/*
|--------------------------------------------------------------------------
| Sidebar Page Order
|--------------------------------------------------------------------------
|
| In the generated Documentation pages the navigation links in the sidebar
| default to sort alphabetically. You can reorder the page identifiers
| in the list below, and the links will get sorted in that order.
|
| 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 or by specifying
| a value to the array key in the list to override the inferred value.
|
*/

'sidebar_order' => [
'readme',
'installation',
'getting-started',
],

/*
|--------------------------------------------------------------------------
| Table of Contents Settings
|--------------------------------------------------------------------------
|
| The Hyde Documentation Module comes with a fancy Sidebar that, by default,
| has a Table of Contents included. Here, you can configure its behavior,
| content, look and feel. You can also disable the feature completely.
|
*/
// A string of Markdown to show in the footer. Set to `false` to disable.
'footer' => '[Back to home page](../)',

/*
|--------------------------------------------------------------------------
| Sidebar Page Order
|--------------------------------------------------------------------------
|
| In the generated Documentation pages the navigation links in the sidebar
| default to sort alphabetically. You can reorder the page identifiers
| in the list below, and the links will get sorted in that order.
|
| 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 or by specifying
| a value to the array key in the list to override the inferred value.
|
*/

'order' => [
'readme',
'installation',
'getting-started',
],

/*
|--------------------------------------------------------------------------
| Table of Contents Settings
|--------------------------------------------------------------------------
|
| The Hyde Documentation Module comes with a fancy Sidebar that, by default,
| has a Table of Contents included. Here, you can configure its behavior,
| content, look and feel. You can also disable the feature completely.
|
*/

'table_of_contents' => [
'enabled' => true,
'min_heading_level' => 2,
'max_heading_level' => 4,
],

'table_of_contents' => [
'enabled' => true,
'min_heading_level' => 2,
'max_heading_level' => 4,
],

/*
Expand Down
85 changes: 35 additions & 50 deletions config/hyde.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@
*/

use Hyde\Facades\Author;
use Hyde\Enums\Feature;
use Hyde\Facades\Meta;
use Hyde\Enums\Feature;
use Hyde\Facades\Navigation;

return [

Expand Down Expand Up @@ -248,7 +249,6 @@
|
| Some of Hyde's features are optional. Feel free to disable the features
| you don't need by removing or commenting them out from this array.
| This config concept is directly inspired by Laravel Jetstream.
|
*/

Expand Down Expand Up @@ -278,17 +278,26 @@
| However, it's tedious to have to add those to each and every
| post you make, and keeping them updated is even harder.
|
| Here you can add predefined authors. When writing posts,
| just specify the username in the front matter, and the
| rest of the data will be pulled from a matching entry.
| To solve this problem, you can add predefined authors with this setting.
| When writing posts just specify the author's username (the array key).
| Hyde will pull the matching data from here and fill in the blanks.
|
*/

'authors' => [
Author::create(
'mr_hyde', // Required username
'Mr. Hyde', // Optional display name
'https://hydephp.com' // Optional website URL
'mr_hyde' => Author::create(
// The following settings are used in the default blog post template.
name: 'Mr. Hyde', // Optional display name
website: 'https://hydephp.com', // Optional website URL

// The following settings are not used in the bundled templates,
// but you can use them in your own custom views, for example.
// bio: 'The mysterious author of HydePHP',
// avatar: 'avatar.png',
// socials: [
// 'twitter' => 'HydeFramework',
// 'github' => 'hydephp',
// ],
),
],

Expand Down Expand Up @@ -323,58 +332,39 @@
|
*/

'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()
->setPagePriorities([
'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' => [
])
->setPageLabels([
'index' => 'Home',
'docs/index' => 'Docs',
],

// These are the route keys of pages that should not show up in the navigation menu.
'exclude' => [
])
->excludePages([
'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' => [
// NavItem::forLink('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'.
'subdirectories' => 'hidden',
],
])
->addNavigationItems([
// Navigation::item('https://github.com/hydephp/hyde', 'GitHub', 200),
])
->setSubdirectoryDisplayMode('hidden'),

/*
|--------------------------------------------------------------------------
| Cache Busting
|--------------------------------------------------------------------------
|
| Any assets loaded using the Asset::mediaLink() helper will automatically
| have a cache busting query string appended to the URL. This is useful
| Any assets loaded using the Hyde Asset helpers will automatically have
| a "cache busting" query string appended to the URL. This is useful
| when you want to force browsers to load a new version of an asset.
| All included Blade templates use this feature to load assets.
|
| The mediaLink helper is used in the built-in views to load the
| default stylesheets and scripts, and thus use this feature.
|
| To disable cache busting, set this setting to false.
| To disable the cache busting, set this setting to false.
|
*/

'enable_cache_busting' => true,
'cache_busting' => true,

/*
|--------------------------------------------------------------------------
Expand Down Expand Up @@ -433,7 +423,7 @@
'host' => env('SERVER_HOST', 'localhost'),

// Should preview pages be saved to the output directory?
'save_preview' => true,
'save_preview' => env('SERVER_SAVE_PREVIEW', false),

// Should the live edit feature be enabled?
'live_edit' => env('SERVER_LIVE_EDIT', true),
Expand Down Expand Up @@ -477,11 +467,6 @@
// Where should the build manifest be saved? (Relative to project root, for example _site/build-manifest.json)
'build_manifest_path' => 'app/storage/framework/cache/build-manifest.json',

// Here you can specify HydeFront version and URL for when loading app.css from the CDN.
// Only change these if you know what you're doing as some versions may be incompatible with your Hyde version.
'hydefront_version' => \Hyde\Framework\Services\AssetService::HYDEFRONT_VERSION,
'hydefront_cdn_url' => \Hyde\Framework\Services\AssetService::HYDEFRONT_CDN_URL,

// Should the theme toggle buttons be displayed in the layouts?
'theme_toggle_buttons' => true,

Expand Down
Loading
Loading