Klein Olivero Subtheme
As of Drupal 9.2, Olivero is still an experimental theme. It doesn't officially support sub-theming yet, but we're going to take that risk.
Requirements:
- Drupal ^9.2
- Olivero theme
- Node and npm
- Node version manager (recommended)
Installation
For a composer-based workflow, modify the Drupal project's composer.json file to add the following in the "repositories" section:
{
"type": "package",
"package": {
"name": "briwagner/klein_olivero",
"version": "1.0",
"type": "drupal-theme",
"source": {
"url": "https://github.com/briwagner/klein_olivero.git",
"type": "git",
"reference": "master"
}
}
}
- Add project to composer (as shown above).
composer require briwagner/klein_olivero
- Navigate to /themes/custom/klein_olivero
npm install
npm run build
- Enable theme in Drupal
Build Step for Front-end Assets
A basic npm script is included in package.json. It uses sass to compile sass files into css.
Sass files that start with an underscore should be imported in global.scss
or another file. They will not be compiled and copied into the dist/
folder on their own.
Sass files that should be copied into the dist/
folder and made available to the web server should NOT begin with an underscore.