You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This makes use of the theme system. Create a folder for your theme within your BookStack `themes` directory. As an example we'll use `my_theme`, so we'd create a `themes/my_theme` folder.
10
12
You'll need to tell BookStack to use your theme via the `APP_THEME` option in your `.env` file. For example: `APP_THEME=my_theme`.
11
13
@@ -50,6 +52,23 @@ This method allows you to register a custom social authentication driver within
50
52
51
53
*See "Custom Socialite Service Example" below.*
52
54
55
+
### `Theme::registerCommand`
56
+
57
+
This method allows you to register a custom command which can then be used via the artisan console.
58
+
59
+
**Arguments**
60
+
- string $driverName
61
+
- array $config
62
+
- string $socialiteHandler
63
+
64
+
**Example**
65
+
66
+
*See "Custom Command Registration Example" below for a more detailed example.*
67
+
68
+
```php
69
+
Theme::registerCommand(new SayHelloCommand());
70
+
```
71
+
53
72
## Available Events
54
73
55
74
All available events dispatched by BookStack are exposed as static properties on the `\BookStack\Theming\ThemeEvents` class, which can be found within the file `app/Theming/ThemeEvents.php` relative to your root BookStack folder. Alternatively, the events for the latest release can be [seen on GitHub here](https://github.com/BookStackApp/BookStack/blob/release/app/Theming/ThemeEvents.php).
The logical theme system supports adding custom [artisan commands](https://laravel.com/docs/8.x/artisan) to BookStack. These can be registered in your `functions.php` file by calling `Theme::registerCommand($command)`, where `$command` is an instance of `\Symfony\Component\Console\Command\Command`.
101
+
The logical theme system supports adding custom [artisan commands](https://laravel.com/docs/8.x/artisan) to BookStack.
102
+
These can be registered in your `functions.php` file by calling `Theme::registerCommand($command)`, where `$command` is an instance of `\Symfony\Component\Console\Command\Command`.
83
103
84
104
Below is an example of registering a command that could then be ran using `php artisan bookstack:meow` on the command line.
0 commit comments