While working with Drupal (10), you would want to inject/add some of your own CSS/JavaScript without modifying the actual theme CSS.
The Module Asset Injector allows you to do the same with some added options of like where to inject, what pages to inject etc. If you are familiar with the Block placement options you will really find this interesting.
The module "Works with Drupal: ^9.3 || ^10" as mentioned on the modules project page.
Add the module as usual and enable it.
The module setting are available under: "Home > Administration > Configuration > Development > Asset Injector"
Here you can either create a CSS section or JavaScript snippet. as set it where it is to be used. As mentioned before you can set where the code is to be used or injected.
e.g if you want your CSS to be used on front page set the location i.e show on pages to <front>
Reload your home page to see it working.
Add new comment