feat: make Buzz a pollora:make:theme template - #3
Merged
Merged
Conversation
The theme's name becomes placeholders the scaffolder substitutes: %theme_name% in the pattern slugs, their category, the asset handle and the config; %theme_namespace% in the provider; the style.css header. The design's vocabulary (buzz-* classes, the buzz_card image size) keeps its name. bin/ (dropped by the scaffolder): the placeholder table, bin/ci/install.php which installs the commit under test substituted as make:theme would, and a package script to bring a theme developed on a site back into the template. CI gains a contract job generating the theme under another slug: no placeholder left, no concrete name left, PHP that parses.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Buzz becomes the third template of
pollora:make:theme(keymagazine), next todefaultandecommerce. The framework side is a separate PR.Placeholders
The theme's name is now substituted by the scaffolder, so a theme generated as
my-journalgets its own identifiers and cannot collide with another theme generated from Buzz:wp:patternrefsbuzz/masthead%theme_name%/mastheadbuzz/script,buzz%theme_name%/script,%theme_name%Theme\Buzz\Providers%theme_namespace%\Providersstyle.cssheaderBuzz, URI, author, version%theme_name%,%theme_uri%…Kept as they are, on purpose: the design's vocabulary —
buzz-*classes and thebuzz_cardimage size.Tooling (
bin/, dropped by the scaffolder)bin/replacements.php: the placeholder table, same as theme-default's (mirrorsMakeThemeCommand::getReplacements()).bin/ci/install.php: installs the commit under test with the placeholders substituted — the theme as a user receives it.bin/package-theme.sh: brings a theme developed on a site (slugbuzz) back into the template.CI
my-journal, then checks no placeholder is left, nobuzz/orTheme\Buzzis left (README excepted), and every PHP file parses.bin/ci/install.phpinstead of a raw copy.Checked locally: generated as
my-journal(namespaceTheme\MyJournal, slugsmy-journal/…, contract clean); generated asbuzzon buzz-demo, built, masthead served. The local browser run was blocked by a host DNS problem (NAT64 answer for*.ddev.site), so this PR's CI is the browser check. Expected on thelockedleg: the same 2 failures as on main (404 status anderror404, fixed in the framework, not yet released).