diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a534a21..7168d147 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased](https://github.com/Pollora/framework/compare/v13.32.0-beta.9...develop) +### Added +- A third `pollora:make:theme` template, **Magazine** (`magazine` → `pollora/theme-buzz`): a Full Site Editing block theme whose templates, parts and patterns are edited in the Site Editor, next to `default` and `ecommerce`. The missing-theme page and admin notice list it too + ### Fixed - A Vite script was printed before WordPress's import map, which Firefox and Safari then ignore: any WordPress script module on the page — the navigation block's, the search block's, the image lightbox's — failed on `@wordpress/interactivity was a bare specifier`, so the block did nothing. Chromium tolerates the order, which hid it. In a classic theme the import map is always in the footer, so any theme with a Vite script in the head was affected as soon as an author inserted such a block. The Vite client of the dev server had the same problem - A block theme's own `404.html` answered with HTTP 200. WordPress core resolves it to `wp-includes/template-canvas.php`, which is never a Blade view, so it always rendered through `FrontendController`'s raw-PHP-template branch — the only branch that never looked at `is_404()`. Measured on a fresh block theme: right content, wrong status diff --git a/resources/views/theme-missing.blade.php b/resources/views/theme-missing.blade.php index f33815f4..d955c5da 100644 --- a/resources/views/theme-missing.blade.php +++ b/resources/views/theme-missing.blade.php @@ -128,6 +128,12 @@
{{ $prefix }}php artisan pollora:make:theme my-shop --repository=pollora/theme-apiary
+ A Full Site Editing block theme: its templates are edited in the Site Editor.
+{{ $prefix }}php artisan pollora:make:theme my-journal --repository=pollora/theme-buzz
+ The command downloads the theme, fills in its metadata, installs its npm dependencies and builds its assets, then activates it in WordPress. Run it from the project root, then reload this page. diff --git a/src/Theme/UI/Console/MakeThemeCommand.php b/src/Theme/UI/Console/MakeThemeCommand.php index 777cdb6d..8985c65e 100755 --- a/src/Theme/UI/Console/MakeThemeCommand.php +++ b/src/Theme/UI/Console/MakeThemeCommand.php @@ -489,6 +489,16 @@ protected function promptForMissingArgumentsUsing(): array protected const TEMPLATES = [ 'default' => 'pollora/theme-default', 'ecommerce' => 'pollora/theme-apiary', + 'magazine' => 'pollora/theme-buzz', + ]; + + /** + * What the prompt says of each built-in template, keyed like TEMPLATES. + */ + protected const TEMPLATE_LABELS = [ + 'default' => 'Default — Basic starter theme', + 'ecommerce' => 'E-commerce — WooCommerce theme (Tailwind CSS, Alpine.js)', + 'magazine' => 'Magazine — Full Site Editing block theme, edited in the Site Editor (Tailwind CSS)', ]; /** @@ -503,8 +513,7 @@ protected function promptForRepository(): ?string $choice = select( label: 'Which theme template would you like to use?', options: [ - 'default' => 'Default — Basic starter theme', - 'ecommerce' => 'E-commerce — WooCommerce theme (Tailwind CSS, Alpine.js)', + ...self::TEMPLATE_LABELS, 'repository' => 'Custom — Download from a GitHub repository', ], default: 'default' diff --git a/src/Theme/UI/Http/MissingThemeNotice.php b/src/Theme/UI/Http/MissingThemeNotice.php index ab75014a..5d38ad28 100644 --- a/src/Theme/UI/Http/MissingThemeNotice.php +++ b/src/Theme/UI/Http/MissingThemeNotice.php @@ -27,15 +27,18 @@ public function render(): void $intro = __('No theme is installed, so the front end of this site cannot be rendered. Generate one from the project root:', 'pollora'); $default = __('Default theme', 'pollora'); $ecommerce = __('E-commerce theme (WooCommerce)', 'pollora'); + $magazine = __('Magazine theme (Full Site Editing)', 'pollora'); printf( - '
%s
%s
%s%s
%s%s
%s
%s
%s%s
%s%s
%s%s