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,127 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
4127 commits
Select commit Hold shift + click to select a range
a2c420d
Fix formatting
caendesilva Dec 1, 2024
ff5ffef
Merge branch 'new-asset-system' into blade-table-of-contents-system
caendesilva Dec 1, 2024
166a551
Merge pull request #2046 from hydephp/blade-table-of-contents-system
caendesilva Dec 1, 2024
aff4388
Create HeadingRenderer.php
caendesilva Dec 1, 2024
ed7f281
Create markdown-heading.blade.php
caendesilva Dec 1, 2024
7e45297
Render slot literally
caendesilva Dec 1, 2024
5607c6d
Indent code
caendesilva Dec 1, 2024
ec6b2c6
Add an attribute for controlling permalink state
caendesilva Dec 1, 2024
98ddab1
Set state from class
caendesilva Dec 1, 2024
e1ccda8
Fix recursion issue
caendesilva Dec 1, 2024
24e459f
Support extra attributes
caendesilva Dec 1, 2024
2c3e07b
Forward node attributes
caendesilva Dec 1, 2024
6631d86
Format props
caendesilva Dec 1, 2024
07d5e97
Update added config setting
caendesilva Dec 1, 2024
c430b9b
Apply fixes from StyleCI
StyleCIBot Dec 1, 2024
b0a4ef9
Register the custom heading renderer
caendesilva Dec 1, 2024
87f03f7
Extract helper method
caendesilva Dec 1, 2024
585764d
Create heading permalinks configuration
caendesilva Dec 1, 2024
bfc93e3
Better option name
caendesilva Dec 1, 2024
cb6c70e
Construct with page class
caendesilva Dec 1, 2024
94cada0
Add permalinks only for configured pages
caendesilva Dec 1, 2024
bcf5cdd
Format long line
caendesilva Dec 1, 2024
22d30c5
Nullable class string
caendesilva Dec 1, 2024
6fbb656
Remove auto-configuration for HeadingPermalinkExtension
caendesilva Dec 1, 2024
b7f0509
Change component to match markup made by extension
caendesilva Dec 1, 2024
539a8eb
Use more explicit assertions
caendesilva Dec 1, 2024
53b158f
Make the permalink headings level configurable
caendesilva Dec 1, 2024
bb9fd0a
Default to minimum level of 2
caendesilva Dec 1, 2024
d8896ad
Introduce local variable
caendesilva Dec 1, 2024
2c53963
Post process to normalize result to CommonMark implementation
caendesilva Dec 1, 2024
358c799
Replace multiple replacements with single Regex
caendesilva Dec 1, 2024
cc8cc6d
Add a test for when heading permalinks are disabled
caendesilva Dec 1, 2024
2475010
Sync configuration files
caendesilva Dec 1, 2024
30469f4
Mock the View factory
caendesilva Dec 1, 2024
a6bcaa1
Fix mock bindings
caendesilva Dec 1, 2024
567b505
Granular mocks
caendesilva Dec 1, 2024
22a7745
Update test to test the automatic permalinks feature
caendesilva Dec 1, 2024
1100719
Remove the `MarkdownService::withPermalinks` method
caendesilva Dec 1, 2024
d03dbf3
Add todo
caendesilva Dec 1, 2024
9311bd1
Create HeadingRendererUnitTest.php
caendesilva Dec 1, 2024
80ed9d4
Create MarkdownHeadingRendererTest.php
caendesilva Dec 1, 2024
5e243e7
Create a minimal view environment
caendesilva Dec 1, 2024
c7eb6bb
Register finder path
caendesilva Dec 1, 2024
bad9eb3
Create and configure the engine resolver
caendesilva Dec 1, 2024
fd6df97
Extract helper method
caendesilva Dec 1, 2024
4995016
Basic constructor tests
caendesilva Dec 1, 2024
a13f1e8
Cleanup helper method code
caendesilva Dec 1, 2024
0d08cc5
Helper to mock child node renderer
caendesilva Dec 1, 2024
6dc0095
Improve formatting
caendesilva Dec 1, 2024
a6b26be
Set default value
caendesilva Dec 1, 2024
598d9c9
Implement initial unit test
caendesilva Dec 1, 2024
5b00e79
Test can add permalink based on configuration
caendesilva Dec 1, 2024
bc876e8
Refactor to data provider attribute
caendesilva Dec 1, 2024
10e905a
Clean up after test
caendesilva Dec 1, 2024
703e70c
Automatically reset to cached config default
caendesilva Dec 1, 2024
039c11a
More extensive range testing
caendesilva Dec 1, 2024
3a709dd
Revert "More extensive range testing"
caendesilva Dec 1, 2024
496260c
Make protected helper methods public internal
caendesilva Dec 1, 2024
90ff929
Remove tests for later refactor
caendesilva Dec 1, 2024
0382947
Cleaner and extended testing
caendesilva Dec 1, 2024
240e3dd
Test more code paths
caendesilva Dec 2, 2024
bbd5a0b
Clarify test name
caendesilva Dec 2, 2024
1195704
Apply fixes from StyleCI
StyleCIBot Dec 2, 2024
65cc1ff
Unit test the post processing
caendesilva Dec 2, 2024
2dd5c32
Clarify test name to specify the reason behind it
caendesilva Dec 2, 2024
b1b6266
Add extra test case
caendesilva Dec 2, 2024
2f31b9b
Apply fixes from StyleCI
StyleCIBot Dec 2, 2024
3c3661a
Clean up test code to remove focus from implementation details
caendesilva Dec 2, 2024
b00ea06
Implement the high level feature test
caendesilva Dec 2, 2024
a7b52d6
Add some more assertions
caendesilva Dec 2, 2024
e67a640
Assert on the full output when relevant
caendesilva Dec 2, 2024
6fe5cb8
Expand feature testing
caendesilva Dec 2, 2024
3c285a7
Add todo
caendesilva Dec 2, 2024
43d82a4
Test escaping
caendesilva Dec 2, 2024
4e80297
Document custom Markdown heading renderer
caendesilva Dec 3, 2024
f53eb4d
Remove the enabled key from the permalinks configuration
caendesilva Dec 3, 2024
ce21d66
Remove the unused `canEnablePermalinks` from `MarkdownService`
caendesilva Dec 3, 2024
3d3ed48
Improve the test
caendesilva Dec 3, 2024
7f79bee
Update RELEASE_NOTES.md
caendesilva Dec 4, 2024
0710e95
More semantic Markdown heading permalinks
caendesilva Dec 4, 2024
8737a52
Conditionally add element identifier
caendesilva Dec 4, 2024
04aa325
Remove support for custom identifier when it breaks permalinks
caendesilva Dec 4, 2024
e7be152
Expect semantic heading identifiers
caendesilva Dec 4, 2024
3c66d44
Refactor to use Tailwind permalink styles
caendesilva Dec 4, 2024
5f90cbc
Tweak styles to match original behaviour
caendesilva Dec 4, 2024
af9f4fa
Update tests for semantic Markdown permalink headers
caendesilva Dec 4, 2024
1caa631
Add scroll margin to header
caendesilva Dec 5, 2024
9c49d46
Format long line
caendesilva Dec 5, 2024
7ebd17f
Merge pull request #2052 from hydephp/semantic-markdown-heading-perma…
caendesilva Dec 5, 2024
418044e
Merge attributes dynamically
caendesilva Dec 5, 2024
4fb8e57
Unwrap unnecessary unwrapping
caendesilva Dec 5, 2024
f9f9755
Trim empty class directives
caendesilva Dec 5, 2024
a36760b
Allow side effect of extra space for edge case
caendesilva Dec 5, 2024
c78ddeb
Inline local variable override
caendesilva Dec 5, 2024
3feddd3
Revert "Inline local variable override"
caendesilva Dec 5, 2024
0d9f3e8
Remove todo as it can be handled in Blade
caendesilva Dec 5, 2024
99e2d1e
Add internal heading registry
caendesilva Dec 5, 2024
7f40d01
Start duplicate suffixes at two
caendesilva Dec 5, 2024
c4e67ff
Add suffix to heading identifiers of the same name
caendesilva Dec 5, 2024
f0adee1
Update RELEASE_NOTES.md
caendesilva Dec 5, 2024
155c456
Add more test values to ensure proper count
caendesilva Dec 5, 2024
b959d2d
Cleanup and refactor code
caendesilva Dec 5, 2024
3df7aa2
Add array types
caendesilva Dec 5, 2024
62f5092
Merge pull request #2047 from hydephp/custom-markdown-heading-renderer
caendesilva Dec 5, 2024
d031807
Merge branch 'master' into 2.x-dev
caendesilva Dec 6, 2024
def9236
Merge branch '2.x-dev' into new-asset-system
caendesilva Dec 6, 2024
6fcbcfa
Update test to be forgiving for system filesystem orders
caendesilva Dec 6, 2024
4163532
Merge branch '2.x-dev' into new-asset-system
caendesilva Dec 6, 2024
0f5a612
Revert "Update test to be forgiving for system filesystem orders"
caendesilva Dec 6, 2024
7c2beb3
Merge branch 'master' into 2.x-dev
caendesilva Dec 6, 2024
fb4b4fb
Merge branch '2.x-dev' into new-asset-system
caendesilva Dec 6, 2024
4cbb1ac
Merge branch 'master' into 2.x-dev
caendesilva Dec 6, 2024
1458c8b
Merge branch '2.x-dev' into new-asset-system
caendesilva Dec 6, 2024
1c6105a
Refactor colored Markdown blockquotes to be rendered using Blade
caendesilva Dec 6, 2024
b929f59
Test with real Blade compiler
caendesilva Dec 6, 2024
121d1dd
Add todo
caendesilva Dec 6, 2024
d357225
Update tests to expect formatted HTML
caendesilva Dec 6, 2024
c7971f1
Move unit test to unit testing namespace
caendesilva Dec 6, 2024
cc9096e
Fix code style
caendesilva Dec 6, 2024
10bb360
Test it resolves all shortcodes
caendesilva Dec 6, 2024
c640271
Try to fix crazed test
caendesilva Dec 6, 2024
9158152
Revert "Try to fix crazed test"
caendesilva Dec 6, 2024
18f8794
Create UsesRealBladeInUnitTests.php
caendesilva Dec 6, 2024
5936d0a
Extract trait for shared testing code
caendesilva Dec 6, 2024
b074735
Try to fix crazed test by default
caendesilva Dec 6, 2024
532ba0f
Update IncludesFacadeUnitTest.php
caendesilva Dec 6, 2024
cbc4152
Forget mocked instance
caendesilva Dec 6, 2024
7f566b8
Revert "Update IncludesFacadeUnitTest.php"
caendesilva Dec 6, 2024
3840066
Revert "Try to fix crazed test by default"
caendesilva Dec 6, 2024
0b79974
Fix path for extracted method
caendesilva Dec 6, 2024
f2b1ef3
Use a partial mock to solve crazyness
caendesilva Dec 6, 2024
2b31bbb
Can now remove unrelated expectation
caendesilva Dec 6, 2024
fcf5efa
Update test for new implementation
caendesilva Dec 6, 2024
466a044
Dynamically set Tailwind blockquote colors in Blade
caendesilva Dec 6, 2024
f01590d
Update documentation for Blade Markdown blockquotes
caendesilva Dec 6, 2024
9731a8d
Update RELEASE_NOTES.md
caendesilva Dec 6, 2024
339f476
Merge pull request #2056 from hydephp/blade-based-colored-markdown-bl…
caendesilva Dec 6, 2024
2a0c38e
Merge branch 'master' into 2.x-dev
caendesilva Dec 6, 2024
7fa8492
Merge branch '2.x-dev' into new-asset-system
caendesilva Dec 6, 2024
2312b88
Document supported version for HydeFront v4
caendesilva Dec 7, 2024
3cc57cb
Document file scope
caendesilva Dec 7, 2024
cc532cc
Extract helper for making the identifier
caendesilva Dec 7, 2024
302168b
Make protected helper public internal
caendesilva Dec 7, 2024
e2a63d5
Use the same identifier generation method everywhere
caendesilva Dec 7, 2024
3f48395
Test needs kernel in isolate
caendesilva Dec 7, 2024
c4e9e05
Add unit test
caendesilva Dec 7, 2024
9784937
Refactor to use dataprovider attribute
caendesilva Dec 7, 2024
be846bf
Revert "Refactor to use dataprovider attribute"
caendesilva Dec 7, 2024
7b2a9c7
Refactor to use dataprovider
caendesilva Dec 7, 2024
d36d8a9
Add some fixtures for common real headings
caendesilva Dec 7, 2024
416338e
Add some fixtures for some edge cases
caendesilva Dec 7, 2024
94577e6
Grouped and improved fixtures
caendesilva Dec 7, 2024
0f2e322
Transliterate heading identifiers
caendesilva Dec 7, 2024
fb9f652
Add additional fixture
caendesilva Dec 7, 2024
25e0a01
Inline default dictionary value
caendesilva Dec 7, 2024
5881e13
Expand ampersands
caendesilva Dec 7, 2024
316023d
Strip escaped angle brackets
caendesilva Dec 7, 2024
fe6864b
Fix typo
caendesilva Dec 7, 2024
19a63ff
Fix faulty expectation
caendesilva Dec 7, 2024
3b7894f
Fix transliterated value
caendesilva Dec 7, 2024
b6bf449
Test heading identifier generation with escaped input
caendesilva Dec 7, 2024
d78add7
Ensure it works with escaped inputs
caendesilva Dec 7, 2024
c240c15
Join comma-separated values into a single line
caendesilva Dec 7, 2024
50f89f8
Cleanup code
caendesilva Dec 7, 2024
0a6bbfa
Merge pull request #2059 from hydephp/normalize-markdown-heading-iden…
caendesilva Dec 7, 2024
2f34586
Release notes for new asset system
caendesilva Dec 8, 2024
5e0ebed
Revert "Temporarily enable end to end testing for all branches"
caendesilva Dec 8, 2024
1a261e2
Todo comments for changes after merge
caendesilva Dec 8, 2024
748664d
Remove unnecessary comment
caendesilva Dec 8, 2024
df47004
Unwrap function call
caendesilva Dec 8, 2024
f0029d1
Extract helper method from code comment
caendesilva Dec 8, 2024
dece097
Add strict types declaration
caendesilva Dec 8, 2024
5e7c05c
Convert concatenation to a scalar values
caendesilva Dec 8, 2024
4f5d228
Replace qualifier with an import
caendesilva Dec 8, 2024
5e653a9
Add inverse test
caendesilva Dec 8, 2024
5508d35
Improve confidence of test
caendesilva Dec 8, 2024
079913d
Move up and improve test
caendesilva Dec 8, 2024
ecbf8bd
Extract helper methods
caendesilva Dec 8, 2024
029a0c6
Apply fixes from StyleCI
StyleCIBot Dec 8, 2024
aab895a
Add todo
caendesilva Dec 8, 2024
3501102
Annotate the array types
caendesilva Dec 8, 2024
0e94056
Extract helper methods
caendesilva Dec 8, 2024
7e0016b
Better document the Vite system
caendesilva Dec 8, 2024
30b0939
Swap section order
caendesilva Dec 8, 2024
a511976
Support all CSS extensions like Laravel Vite uses
caendesilva Dec 8, 2024
7230be5
Improve accuracy of test
caendesilva Dec 8, 2024
59979e3
Use else if instead of if
caendesilva Dec 8, 2024
06d9641
Revert "Use else if instead of if"
caendesilva Dec 8, 2024
da2ba15
Add more tests
caendesilva Dec 8, 2024
d5ec63d
Extract helper to format the asset path
caendesilva Dec 8, 2024
4bc0f52
Use static instead of self
caendesilva Dec 8, 2024
8af55ed
Add helper to get single asset
caendesilva Dec 8, 2024
fb3865c
Simplify test
caendesilva Dec 8, 2024
bf88379
Throw exception if the asset type is not supported
caendesilva Dec 8, 2024
b048fae
Use only hotfiles instead of internal environment variable
caendesilva Dec 8, 2024
9ffbeed
Extract constant for CSS extensions
caendesilva Dec 8, 2024
f418e2b
Support more JavaScript extensions
caendesilva Dec 8, 2024
83264ca
Extract helper method for repeated code
caendesilva Dec 8, 2024
efbb177
Merge pull request #2060 from hydephp/improve-the-vite-integration
caendesilva Dec 8, 2024
0878552
Remove section as there is only one component left
caendesilva Dec 8, 2024
a3ac13a
Document HydeSearch overloading
caendesilva Dec 8, 2024
c66e2f5
Extract helper methods
caendesilva Dec 8, 2024
2b30ef2
Use fluent sleep declaration
caendesilva Dec 8, 2024
e88c368
Make sure docs is up to date
caendesilva Dec 8, 2024
c831eea
Clean up formatting
caendesilva Dec 8, 2024
bf07112
Make Vite process nullable
caendesilva Dec 8, 2024
d1199d5
Use null safe operator
caendesilva Dec 8, 2024
35d1238
Move up option handler
caendesilva Dec 8, 2024
ba2c7c6
Inline variable
caendesilva Dec 8, 2024
96a00ea
Fix clunky wording
caendesilva Dec 8, 2024
08a9661
Expand on file documentation
caendesilva Dec 8, 2024
5110508
Add internal environment variable if we will use Vite
caendesilva Dec 8, 2024
e9881cb
Revert "Add internal environment variable if we will use Vite"
caendesilva Dec 8, 2024
d2793df
Add parameter if we will use Vite
caendesilva Dec 8, 2024
8d16f52
Mark the HeadingRenderer class as internal
caendesilva Dec 8, 2024
f3f5b08
Make variable name clearer
caendesilva Dec 8, 2024
830ddbf
Add component props
caendesilva Dec 8, 2024
8969c03
Consistent variable naming
caendesilva Dec 8, 2024
cd66953
Document reason for the heading registry
caendesilva Dec 8, 2024
a037ab1
Use consistent naming for heading identifiers
caendesilva Dec 8, 2024
9e62334
Invert ternary class logic
caendesilva Dec 8, 2024
6be9c9d
Refactor to class directive
caendesilva Dec 8, 2024
7d0d58b
Merge class directive rows into ternary expression
caendesilva Dec 8, 2024
b8bbf36
Fix typo
caendesilva Dec 8, 2024
1b5113d
Swap line order
caendesilva Dec 8, 2024
b04bff2
Improve formatting
caendesilva Dec 8, 2024
b195b2f
Breaking: Remove `DocumentationPage::hasTableOfContents` method
caendesilva Dec 8, 2024
17fa356
Slimmer formatting for single line annotations
caendesilva Dec 8, 2024
af9dd9e
Invert and merge control flow
caendesilva Dec 8, 2024
3f77d0c
Add spacing
caendesilva Dec 8, 2024
6487ee1
Clarify removal reason
caendesilva Dec 8, 2024
bae76b2
Remove parameter from `HydeFront::cdnLink()`
caendesilva Dec 8, 2024
11634c0
Remove deprecation
caendesilva Dec 8, 2024
0987ac0
Inline local variable
caendesilva Dec 8, 2024
57334a5
Clean up formatting
caendesilva Dec 8, 2024
801d9de
Extract methods from complex inner loop
caendesilva Dec 8, 2024
4fd21b6
Cleanup code
caendesilva Dec 8, 2024
b01e9ea
Add todo
caendesilva Dec 8, 2024
70a572b
Fix formatting
caendesilva Dec 8, 2024
54012db
Merge branch 'master' into 2.x-dev
caendesilva Dec 8, 2024
b38248c
Merge branch '2.x-dev' into new-asset-system
caendesilva Dec 8, 2024
cc21b86
Merge pull request #2006 from hydephp/new-asset-system
caendesilva Dec 8, 2024
0841928
Debug workflow issue
caendesilva Dec 9, 2024
8c7bc01
Revert "Debug workflow issue"
caendesilva Dec 9, 2024
ddb899e
Debug workflow issue
caendesilva Dec 9, 2024
59fc714
Revert "Debug workflow issue"
caendesilva Dec 9, 2024
7092df6
Skip empty identifiers to allow just child items
caendesilva Dec 10, 2024
8c11d39
Reset array keys
caendesilva Dec 10, 2024
bb5012b
Merge branch 'master' into 2.x-dev
caendesilva Dec 22, 2024
d18e093
Merge branch 'master' into 2.x-dev
caendesilva Dec 22, 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: 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,
]));
}
675 changes: 637 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
18 changes: 18 additions & 0 deletions config/markdown.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,22 @@
*/

'prose_classes' => 'prose dark:prose-invert',

/*
|--------------------------------------------------------------------------
| Heading Permalinks Configuration
|--------------------------------------------------------------------------
|
| Here you can specify which page classes should have heading permalinks.
| By default, only documentation pages have permalinks enabled, but you
| are free to enable it for any kind of page by adding the page class.
|
*/

'permalinks' => [
'pages' => [
\Hyde\Pages\DocumentationPage::class,
],
],

];
Loading
Loading