Twig in External jQuery I'm a little bit new to Craft, but it's already my favorite CMS, even after 8 years or so in Wordpress.

Here's what I need to do. I have integrated a preloader into my site, using preload.js, and I need to know if there is a way to utilize Twig within my JavaScript files.

Essentially, preload.js gets all of the assets to preload from a load Manifest, which is created with JSON. I got this working properly as an inline script, simply pulling the sources of all my assets, based on this question. What I need to know is, is there a way to use these Twig tags inside of an external JavaScript file? I know that there is in liquid, but I'd like to get this working here as well.

Thanks.
Just put your javascript file in the templates folder. E.g. place a file called external.js in the folder craft/templates/includes/. Then include it like this &lt;script src="/includes/external.js" type="text/javascript"&gt;&lt;/script&gt;

I don't know if this is an official way to do it, but it works.