-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Configuration and autodiscovery improvements #340
Conversation
[ci skip] [skip ci]
Apply fixes from StyleCI
…work into configuration-improvements
Note that the test suite assumes the default directories, as does the HydeRC, meaning that changing source directories at this time will probably cause the realtime compiler to fail. Still need to add test before I can merge
Edit: Nope, does not work. Sorry. |
[ci skip] [skip ci]
Apply fixes from StyleCI
Okay, think I got a workflow for customizing source directories that I like and in a way that improves the original behaviour instead of completely changing it. The pages are now registered in the HydeServiceProvider $this->registerDefaultDirectories([
BladePage::class => '_pages',
MarkdownPage::class => '_pages',
MarkdownPost::class => '_posts',
DocumentationPage::class => '_docs',
]);
// If you change the Blade source directory, the config needs to be updated.
// It can be done using this helper found in the same service provider.
$this->discoverBladeViewsIn('_pages'); They are then stored in the same static class property that already exists protected function registerDefaultDirectories(array $directoryMapping)
{
foreach ($directoryMapping as $class => $location) {
$class::$sourceDirectory = $location;
}
} You can then change these directories in many ways. My suggested way would be by adding your own service provider,
|
I also want to implement changing of the output directories |
[ci skip] [skip ci]
[ci skip] [skip ci]
Apply fixes from StyleCI
…ramework into 330-add-option-for-pretty-urls
[ci skip] [skip ci]
Apply fixes from StyleCI
…ramework into 330-add-option-for-pretty-urls
[ci skip] [skip ci]
Apply fixes from StyleCI
[ci skip] [skip ci]
Apply fixes from StyleCI
Add configurable "pretty URLs"
[ci skip] [skip ci]
Apply fixes from StyleCI
New features:
Changes:
Other:
Will close the following:
Fix #343
Fix #336
Fix #330
Fix #349
Fix #353
Fix #350
Will also fix #307
While not utilizing the service container directly, what I was trying to accomplish by doing so has been implemented in this branch, and so I think it can also resolve #332