Customize your theme¶
The theme defines the visual look and feel of your site, by providing the HTML markup and CSS styling that wraps the content.
If you installed using the Drupal CMS Starter template, your theme is called Mercury. Details on how to customize Mercury theme are available in the README.md file, located in themes/contrib/mercury.
If you installed using the Byte template, your theme is called Byte. Details on how to customize Byte theme are available in the README.md file, located in themes/contrib/byte_theme.
Both Mercury and Byte integrate with Canvas via single-directory components.
Renaming the Blank theme¶
If you installed using the Blank site template, your theme is called blank.
You can't just rename the blank theme's folder, because the name is used in a few places. Here's how to rename it safely; in this example, we're renaming the theme from blank to example. These commands assume you're using DDEV, which is the recommended way to run Drupal CMS locally.
# Generate a new `example` theme as a copy of Blank.
ddev exec dr generate-theme example --starterkit=blank --path=themes/custom --no-interaction
# Clear Drupal's cache so it can recognize the new theme.
ddev drush cache:rebuild
# Install the new theme and make it the default.
ddev drush theme:install example --yes
ddev drush config:set system.theme default example --yes
# Delete the old folder if everything looks good.
ddev exec rm -r web/themes/custom/blank
Keep a copy of the old blank folder until you've checked the site, in case something broke.