Skip to content

feat: make Buzz a pollora:make:theme template - #3

Merged
ogorzalka merged 1 commit into
mainfrom
feature/scaffold-template
Sep 29, 2026
Merged

ogorzalka merged 1 commit into
mainfrom
feature/scaffold-template

Conversation

@ogorzalka

Copy link
Copy Markdown
Member

Buzz becomes the third template of pollora:make:theme (key magazine), next to default and ecommerce. The framework side is a separate PR.

Placeholders

The theme's name is now substituted by the scaffolder, so a theme generated as my-journal gets its own identifiers and cannot collide with another theme generated from Buzz:

Where Before Template
Pattern slugs, category, wp:pattern refs buzz/masthead %theme_name%/masthead
Asset handle, config name, category label buzz/script, buzz %theme_name%/script, %theme_name%
Provider namespace Theme\Buzz\Providers %theme_namespace%\Providers
style.css header Buzz, URI, author, version %theme_name%, %theme_uri%…

Kept as they are, on purpose: the design's vocabulary — buzz-* classes and the buzz_card image size.

Tooling (bin/, dropped by the scaffolder)

  • bin/replacements.php: the placeholder table, same as theme-default's (mirrors MakeThemeCommand::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 (slug buzz) back into the template.

CI

  • New Contract job, no site: generates the theme as my-journal, then checks no placeholder is left, no buzz/ or Theme\Buzz is left (README excepted), and every PHP file parses.
  • Browser job: installs through bin/ci/install.php instead of a raw copy.

Checked locally: generated as my-journal (namespace Theme\MyJournal, slugs my-journal/…, contract clean); generated as buzz on 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 the locked leg: the same 2 failures as on main (404 status and error404, fixed in the framework, not yet released).

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.
@ogorzalka
ogorzalka merged commit cc09773 into main Sep 29, 2026
4 of 6 checks passed
@ogorzalka
ogorzalka deleted the feature/scaffold-template branch September 29, 2026 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant