Declaring our library, adding CSS and JS files to our theme 🥪Real life Drupal 8 theming project 5#

Опубликовано: 17 Февраль 2026
на канале: Drupal Up - Drupal 8 Video Tutorials
13,980
106

This tutorial shows how to declare a simple Drupal 8 theme library. As this library is declared in the .libraries.yml file you are able to add CSS and Javascript files to your theme.

We will copy all the CSS and Javascript files from our static version of the site and we will add them to our newly created library.

As our library with the assets is declared - we will declare that we will use it in our theme by adding it to our .info.yml file.

At the end we will see that we have all our CSS and JS files in our theme.

If you want to learn more about Drupal 8 theming - please check our "Full course on Drupal 8 theming here" with this link you get 20% discount -
https://www.udemy.com/full-introducti...

On the Drupal Up website - you may find even more resources for Drupal 8 development - http://drupal-up.com