Reference
Child theme tutorial
The repository tutorial for scaffolding and distributing a child theme.
Includes the complete docs/tutorials/THEME.md reference from this build. Application paths refer to your own installation.
On this page
Build a child theme#
Start with a clean local VoltexaHub install: run composer install, copy .env.example to .env, configure a disposable local database, run php artisan key:generate, then php artisan forum:install [email protected]. Set FORUM_ADMIN_PASSWORD in the process environment or enter a password at the prompt. Run npm ci && npm run build. Never commit .env, database files or generated accounts.
- Run
php artisan forum:make-theme sunrise. This createsthemes/sunrise/theme.json,assets/custom.css, and an emptyviews/directory. IDs are lowercase, start with a letter, and are at most 32 characters; the command refuses an existing directory. - Edit
themes/sunrise/assets/custom.css. The generated stylesheet changes the accent in light and dark modes. Child assets load after the base theme without rebuilding. - Activate it in Administration → Themes or run
php artisan forum:theme sunrise. Load the home page and confirm<html data-theme="sunrise">and the declared/theme-assets/sunrise/custom.cssstylesheet. Check a discussion page and both appearance modes. - To customize structure, copy one file from
themes/default/views/intothemes/sunrise/views/and declare its current revision inview_revisionsintheme.json. Read the view reference; keep authorized data and form contracts intact. A view not copied inherits from Default. - Recover from a broken public override through Administration → Themes or
php artisan forum:theme default. Admin pages do not boot the public theme.
Do not edit core or default theme files for a custom theme. Package the themes/sunrise directory, then activate it on the destination after installing the application. Review override warnings when upgrading VoltexaHub.