Updating theme
How to update Drupal theme and tooling
Ensure that you always review the release notes prior to beginning the update process.
Always test your updates in non-production environments first.
Drupal theme update
The updates may contain both configuration and content updates.
Updates would need to run in production environment.
If configuration is managed through files, make sure that your database updates run before your configuration import in your production environment.
Run the below steps locally:
Update CivicTheme base theme code:
or download the latest version from Drupal.org and place into the desired location
Run updates and export the configuration
Important! Do not skip this step or you may miss the important schema changes.
Re-provision the site with updated configuration.
Check that everything looks good.
Commit exported configuration files and deploy to the non-production environment for testing.
Tooling update
CivicTheme comes with a starter kit, which contains tooling required to build and integrate sub-theme TWIG, CSS and JS assets into Drupal. This tooling is mostly JS-based and requires regular maintenance.
CivicTheme may ship an update to tooling requiring your sub-themes to update their own tooling. Refer to update notes and update tooling configuration as described.
Below is required only if the release notes explicitly call out tooling updates
Although unique scenarios may arise depending on your sub-theme customisations, the most common use case involves regenerating your sub-theme:
Move your custom sub-theme directory elsewhere
Run sub-theme creation script to create a new sub-theme with the same name
Commit changes
Copy your custom sub-theme back
Use your git diff tool to accept/decline changes
Usually, you would preserve your own components
and assets
directories, as they would contain most of the sub-theme customisations, and accept the rest of changed files as updates.
Last updated