Is it possible to combine Hugo with JavaScript components? If yes, what is the best way?

Hi! I need to use Web Components alongside Hugo. Can someone explain me, what is the best way to combine those? Can I have my JS files in the root of the project? If yes, how can I reference them with Hugo?

Thank you all upfront.

I’ve never used, but the answer to

is yes, and how to access them depends on whether you need the JS files in the root of the target site or in the root of the Hugo project folder. If the latter, you will need to look at ‘mounts’:

1 Like