Two files
extra/extensions/acme/minimal/composer.json
extra/extensions/acme/minimal/templates/index.twig
Why it works
An entry class is optional for themes, so no PHP and no
autoload block are needed. extra.status is ignored: a theme is active when it’s the one published in the admin panel.
Set
version even here. Installing a theme from an archive runs Composer with that version, and a missing or stale one makes installs unpredictable.Adding pieces as you need them
Rules that still apply
- Guard optional variables. Debug mode enables strict Twig variables, so
{% if user is defined %}and|default(...)matter even in a small theme. - Use the theme translation domain.
d__('theme', '...')anddp__('theme', 'context', '...')resolve against your catalogs; a plain__()looks in the application’s. - Honor admin settings. Reading
option.site.name,option.brand.logoandoption.policies.*keeps the admin panel meaningful. - Include the script-tag snippets if you want the analytics codes administrators configure to work. See Script tags and analytics.