Lightna Lane is almost there! Read more | Lightna release is coming! Keep me updated
|||
🚧 Documentation in Progress 🚧
This documentation is actively being written and updated daily. Some sections may change or expand as we improve it.
If you have any questions or suggestions, feel free to reach out .
Content

Editions

Editions allow creating different builds with specific module sets. For example, you might need two different designs or separate websites with unique features.

Create an Edition Folder

By default, only the main edition exists. Create a new one next to it, for example:

edition
├── main
└── my-edition

Configure

A new edition is initially a copy of main. To customize it, create a config.php inside edition/my-edition. It can also have its own env.php, but this is usually unnecessary. The new config.php can be a copy of main/config.php with manual edits or extend the main config, for example:

<?php
 
$config = require __DIR__ . '/../main/config.php';
 
$config['modules']['enabled'] = array_merge(
$config['modules']['enabled'],
[
'module/special-feature',
'module/special-theme',
],
);
 
return $config;

The example above reuses main/config.php and adds two additional modules.

Add New Edition to the Build

All commands are already available for the new build using an environment variable:

LIGHTNA_EDITION=my-edition <command>

Update your Makefile commands to include the new build, for example:

 
build:
LIGHTNA_EDITION=main make _build
+ LIGHTNA_EDITION=my-edition make _build
 
compile:
LIGHTNA_EDITION=main make _build.compile.direct
+ LIGHTNA_EDITION=my-edition make _build.compile.direct
 
config.apply:
LIGHTNA_EDITION=main ./cli config.apply
+ LIGHTNA_EDITION=my-edition ./cli config.apply
 
test.unit:
LIGHTNA_EDITION=main make _test.unit
+ LIGHTNA_EDITION=my-edition make _test.unit

Initialize Edition on the Frontend

The current edition is determined by the LIGHTNA_EDITION environment variable. Set its value to the new build name for the website to use the new edition.

⚙️  Documentation Review

Noticed an issue or need more details? Submit your feedback for this page.
Leave a Feedback