Articles


How to create Bootstrap subtheme[CDN] in drupal 8 ?

How to create Bootstrap subtheme[CDN] in drupal 8 ?



Posted bysivaprasad,2nd Nov 2016

In my previous article we learned how to create a bootstrap subtheme in drupal 7. In this article we learn to create a bootstrap subtheme in Drupal8.

 

Download and enable the Bootstrap Module.

 

We can use the Drush Command 'drush en -y bootstrap'

 

After enabling goto the themes folder. There we can find the bootstrap folder.

 

Go to the 'cdn' folder inside the bootstrap/starterkits.

 

Copy the folder and paste it inside the themes folder.

 

Rename the folder to the subtheme name eg:- 'mysubtheme'

 

Open the folder and we can see the three files, rename the files as

 

THEMENAME.libraries.yml to mysubtheme.libraries.yml(libraries file)

 

THEMENAME.starterkit.yml to mysubtheme.info.yml(info file)

 

THEMENAME.theme to mysubtheme.theme(similar to template file)

 

Open the info file, change 'THEMENAME/global-styling' to 'mysubtheme/global-styling' under the libraries section.

 

Also change the name and description of the subtheme.

 

Then goto the site, under the appearance we can find the subtheme.

 

Click enable and set us default.

 

Make necessary style changes in style.css file.

 

Related Articles