Hello!
Following the Theme Tutorial I have a user/themes/mytheme/templates/partials/base.html.twig file in my theme. As it is a modular theme, I further have another file user/themes/mytheme/templates/modular.html.twig that doesn't extend base.html.twig and a couple of "specialized" templates extending modular.html.twig.
The most important thing is, that neither modular.html.twig nor any of its subclasses has a connection to the html <head>.
Now it happens that one of my modules needs some things added to the <head> (in my case it's some JavaScript but more general it could be anything). This leads to my question:
Is there a clean way to add stuff to the head from a typical module twig?
Of course on solution would be to make a module template that inherits from base.html.twig but as this link would be rather synthetical I wouldn't find this practice very elegant.
Thank you in advance!