Installation

Last updated on
24 January 2023

In order to use bs_bootstrap and any child theme that is based on bs_bootstrap you first need to download and install bs_lib contributed module. This module requires the installation of a couple of libraries in your project libraries folder:

  • Bootstrap 4 library installation. Download Bootstrap 4 'Source code' from https://github.com/twbs/bootstrap/releases and extract it. Rename extracted folder to bootstrap and place it in the libraries folder. The exact version of Bootstrap that you should download depends on the version of bs_base you are using. Please refer to bs_base project page for more details about this information.

  • Popper library installation. Download Popper library from https://github.com/FezVrasta/popper.js/releases (Bootstrap 4 minimal dependency is version v1.11.0) and extract it. Rename extracted folder name to popper and place it in the libraries folder.

  • [OPTIONAL] Jasny Bootstrap library installation. Download forked Jasny Bootstrap library from https://github.com/pivica/jasny-bootstrap/archive/master.zip and extract it. Rename extracted folder to jasny-bootstrap and place it in libraries folder. You need Jasny bootstrap library only if you want to use off-canvas navigation for the navigation bar. 

If you are using composer to manage your site dependencies that it is recommended to add all bs_lib dependencies to your composer.json definition so they can be managed by a composer.

 When all libraries are in place visit 'Status Report' page on admin/reports/status and verify that all BS Lib dependencies are reported as installed.

You can now proceed with the download and installation of bs_base contributed theme.

Node and node build dependencies

You will need to have Node version 18 and globally installed gulp-cli npm package. Instead of npm you can use  pnpm package manager which is faster and more resource efficient.

We recommend using nvm Node version manager if you have a need for different Node versions installed on your local system.

Our build process by default is using pnpm and will fallback to npm if pnpm is not installed on your system. Also we are using npx runner to run gulp scripts.

However, you can use any other node package manager and runner - edit your custom theme package.json file and change `build-css` script to suit your needs.

Install gulp-cli with next command:

npm install -g gulp-cli

We currently support Node 12.x out of the box. Version 14 and 16 seems to work fine. Development version will require Node version 18, see this issue for more details.

Drush create and update generator commands

You do not need a running Drupal instance (with a database) in order to use drush create and update commands. However, if you do not have a running Drupal instance then you will need to add next symbolic link to your .drush home folder:

ln -s /path/to/project/web/themes/contrib/bs_base/bs_base.drush.inc ~/.drush/bs_base.drush.inc

Help improve this page

Page status: No known problems

You can: