Theme Setup
In this episode of Drupal 8 Theming tutorial series we are going to setup our theme, add our css file to it, remove some default css files and add our main JavaScript file.
Drupal uses .yml files for dealing with libraries (css and js), this is great. But the setup of those files in your theme isn’t exactly intuitive, but it’s not hard either.
In this tutorial you will learn how to register your theme and add css and JavaScript files to your theme.
Code used in this video
endymion.info.yml
name: Endymion
description: Drupal 8 Starter Theme
type: theme
core: 8.x
libraries:
- endymion/global-css
- endymion/global-js
stylesheets-remove:
- core/themes/stable/css/views/views.module.css
- core/themes/stable/css/system/components/align.module.css
```**endymion.libraries.yml**
```yml
global-css:
css:
theme:
css/style.css: {}
global-js:
js:
js/main.js: {}
dependencies:
- core/jquery