Extension:Bootstrap

The Bootstrap extension provides the Bootstrap 4 web front-end framework to MediaWiki. It can be activated directly or used from skins or extensions.

Currently Bootstrap version 4.3.1 is provided.

Installation
The Bootstrap extension requires Composer for installation. (But why!?)


 * 1) If not already done, install Composer.
 * 2) Add   as a requirement to your "composer.local.json" file in the MediaWiki installation directory
 * 3) Run
 * 4) Load the extension by adding the following line to LocalSettings.php:
 * 5) ✅ – Navigate to "Special:Version" on your wiki to verify that the extension is successfully installed.

Remark: It is NOT necessary to install or load any extensions this extensions depends on.

Usage
Use  to get the singleton managing the Bootstrap framework.

With the returned object,
 * add Bootstrap modules using,  , and
 * set SCSS variables using  and
 * add style files using
 * add cache trigger files using

Finally to add the Bootstrap styles and javascript to the page use  for styles and   for scripts.

To simply enable Bootstrap styles on all pages add the following code to your "LocalSettings.php" file:

For an example on how to include Bootstrap styles in a skin have a look at the Chameleon skin.

Directly related

 * the Bootstrap framework homepage
 * the SASS/SCSS homepage
 * the Chameleon skin that uses this extension
 * the BootstrapComponents extension that uses this extension and lets editors utilize its potential inside wiki markup

Disambiguation

 * the Bootstrap skin is another Bootstrap based skin independent from either extension