Working with libraries
While Drupal 8 ships with some improvements to its default CSS and JavaScript libraries, we will generally find ourselves wishing to add additional third-party libraries that can enhance the function and feel of our website. In our case, we have decided to add Twitter Bootstrap (http://getbootstrap.com), which provides us with a responsive CSS framework and JavaScript library that utilizes a component-based approach to theming.
The process involves three steps:
- First is downloading or installing the assets that make up the framework or library.
- Second is adding library entries that point to our assets.
- Finally, we will need to add a library reference to our
twiggy.info.yml
file.
Adding assets
We can easily add the Twitter Bootstrap framework assets by following these steps:
- Navigate to http://getbootstrap.com/getting-started/#download.
- Click on the
Download Bootstrap
button. - Extract the ZIP file.
- Copy the contents of the bootstrap folder to our
/themes/twiggy
folder, keeping...