diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 2a2fe9a5bab..9d251312db1 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -14,9 +14,11 @@ This serves two purposes: - Added a `Hyde::route()` helper to the `Hyde` facade in https://github.com/hydephp/develop/pull/1591 - Added new global helper functions (`asset()`, `route()`, `url()`) in https://github.com/hydephp/develop/pull/1592 - Added a new `Feature` enum to improve the `Features` facade in https://github.com/hydephp/develop/pull/1650 +- Added a helper to `->skip()` build tasks in https://github.com/hydephp/develop/pull/1656 ### Changed - The `features` array in the `config/hyde.php` configuration file is now an array of `Feature` enums in https://github.com/hydephp/develop/pull/1650 +- Sitemap generation will now be skipped if a base URL is not set, as Google now will not index sitemaps without a base URL in https://github.com/hydephp/develop/pull/1660 ### Deprecated - Deprecated the static `Features` flag methods used in the configuration files in https://github.com/hydephp/develop/pull/1650 and will be removed in HydePHP v2.0 @@ -26,6 +28,7 @@ This serves two purposes: ### Fixed - Fixed a bug where the sitemap and RSS feed generator commands did not work when the `_site/` directory was not present in https://github.com/hydephp/develop/pull/1654 +- Fixed extra newlines being written to console for failing build tasks in https://github.com/hydephp/develop/pull/1661 - Realtime Compiler: Fixed responsive dashboard table issue in https://github.com/hydephp/develop/pull/1595 ### Security diff --git a/docs/advanced-features/build-tasks.md b/docs/advanced-features/build-tasks.md index e928736bec1..51180d15d62 100644 --- a/docs/advanced-features/build-tasks.md +++ b/docs/advanced-features/build-tasks.md @@ -173,3 +173,22 @@ public function handle(): void $this->output->writeln('This is a line of text'); } ``` + +### Skipping tasks + +>info This feature was added in HydePHP v1.6.0 + +If you for some reason need to skip the task during its execution, you can call the `skip()` method. + +```php +public function handle(): void +{ + if ($this->someCondition() !== true) { + $this->skip('Some condition was not met'); + + // The task will not be executed past this point + } +} +``` + +This will then halt the execution of the task, and display a notice with the message you provided to the console. diff --git a/packages/framework/resources/views/components/navigation/theme-toggle-button.blade.php b/packages/framework/resources/views/components/navigation/theme-toggle-button.blade.php index d5732f996ad..2b21c1f9528 100644 --- a/packages/framework/resources/views/components/navigation/theme-toggle-button.blade.php +++ b/packages/framework/resources/views/components/navigation/theme-toggle-button.blade.php @@ -1,4 +1,4 @@ -@if(Features::hasDarkmode())) +@if(Features::hasDarkmode())