# Concatenate 2 x JS Files to Inline Script

**URL:** <https://discourse.gohugo.io/t/concatenate-2-x-js-files-to-inline-script/25896>\
**Category:** support\
**Created:** [May 29, 2020, 12:27am UTC](https://discourse.gohugo.io/t/concatenate-2-x-js-files-to-inline-script/25896 "2020-05-29T00:27:07Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Richard\_77](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/richard_77/32/9986_2.png) [@Richard\_77](https://discourse.gohugo.io/u/Richard_77)\
**Post date:** [May 29, 2020, 6:32am UTC](https://discourse.gohugo.io/t/concatenate-2-x-js-files-to-inline-script/25896/3 "2020-05-29T06:32:55Z")

</div>

Yes I took a look at that previously.

But how do I get this content:  
{{ $plugins := resources.Get “js/plugins.js” }}  
{{ $global := resources.Get “js/global.js” }}  
{{ $js := slice $plugins $global | resources.Concat “js/bundle.js” }}

into a tag like this in the html

```
<script>
concatenated inline JS here
</script>

```

Thanks,

---

_[View the full topic](https://discourse.gohugo.io/t/concatenate-2-x-js-files-to-inline-script/25896)._
