I have a modular page which loads an external service (like Google Maps). I want the scripts of this service are only loaded when the modular page is used.
For example I have a modular page which shows a Google Maps of my company location, this map is only shown in About and Contact page, so the scripts of Google Maps are loaded only in these 2 pages.
If I use addInlineJs or addJs of Assets Manager and then use
{{ assets.js() }}
The scripts are shown where they called (in ).
There is an Assets plugin but it only works with *.md file. I want to add theses scripts in *.twig file.
Is there anyway I can do this?