- 403 views
First of all, we have to install Bootstrap 3 theme under Drupal 8.
If you are familiar with Composer, install with the following command:
composer require 'drupal/bootstrap'
If you are not using Composer at all, just download the theme zip file from the following link:
https://www.drupal.org/project/bootstrap
And place it under your /themes directory.
Now navigate to /themes/bootstrap/starterkits and duplicate the folder THEMENAME in your /themes folder.
So now you should have the following folder structure:
/themes - bootstrap - THEMENAME
Of course, we will rename the THEMENAME to suit your theme name, let's go with "mychildtheme" name.
If you navigate to /themes/mychildtheme folder, you should see 3 files:
-
THEMENAME.libraries.yml
-
THEMENAME.starterkit.yml
-
THEMENAME.theme
Rename all 3 of them to match your new theme name. So now they should be:
-
mychildtheme.libraries.yml
-
mychildtheme.info.yml
-
mychildtheme.theme
As you can see, "starterkit" was renamed to "info". Keep that in mind.
Now open mychildtheme.info.yml and edit the file accordingly, beware at line 5 and 24:
Line 5:
name: 'mychildtheme'
And line 24:
- mychildtheme/framework
Those are YAML files and they are white-space sensitive, so always change only the characters itself and never add nor remove any white space before or after the strings.
Navigate to config directory, where you should find install and schema directories.
Navigate to install directory in your theme and rename THEMENAME.settings.yml to mychildtheme.settings.yml.
Navigate to schema directory in your theme and rename THEMENAME.schema.yml to mychildtheme.schema.yml.
Open the file and change to following:
# Schema for the theme setting configuration file of the MyThemeTitle theme. mychildtheme.settings: type: theme_settings label: 'MyThemeTitle settings'
Those are YAML files and they are white-space sensitive, so always change only the characters itself and never add nor remove any white space before or after the strings.
Congratulations! Now you should be able to install your newly created theme via Drupal 8 UI.