Drupal 8 attach library to front page code example Example: drupal 8 attach library $variables['#attached']['library'][] = 'your_module/library_name';