# Are asset pipelines working on Netlify for anyone?

**URL:** <https://discourse.gohugo.io/t/are-asset-pipelines-working-on-netlify-for-anyone/12953>\
**Category:** support\
**Created:** [July 15, 2018, 8:58pm UTC](https://discourse.gohugo.io/t/are-asset-pipelines-working-on-netlify-for-anyone/12953 "2018-07-15T20:58:41Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![TotallyInformation](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/totallyinformation/32/5668_2.png) [@TotallyInformation](https://discourse.gohugo.io/u/TotallyInformation)\
**Post date:** [July 24, 2018, 11:30am UTC](https://discourse.gohugo.io/t/are-asset-pipelines-working-on-netlify-for-anyone/12953/10 "2018-07-24T11:30:56Z")

</div>

For clarity to help others, here is the full process.

1. Install the extended version of Hugo locally.
2. Make sure you have `resources` and `assets` folders, create them if needed.
3. Make sure both folders are added to your git commit.
4. Move resources you wish process into the `assets` folder. I created sub-folders in the same structure as the `static` folder that previously contained my css & js assets.
5. Adjust your templates to use the `resources` function. See below for some examples.
6. Run either `hugo` or `hugo server` to populate the `resources` folder.
7. Update your `netlify.toml` settings file so that Netlify uses Hugo v0.45+
8. Commit and sync your git repo - Netlify should now build your site just fine.
9. Test and enjoy!

Examples from my `layouts/_default/baseof.html`.

For CSS, note the use of BulmaCSS and my own overrides. This is in the `<head>` section:

```auto
    {{/* Bundle and minimise CSS resources */}}
    {{- $bulmacss := resources.Get "css/bulma.css" -}}
    {{- $css2016 := resources.Get "css/2016.css" -}}
    {{- $syntax := resources.Get "css/syntax.css" | minify | fingerprint -}}
    {{- $styles := (slice $bulmacss $css2016) | resources.Concat "css/bundle.css" | minify | fingerprint }}
    <link rel="stylesheet" href="{{ $styles.Permalink }}" integrity="{{ $styles.Data.Integrity }}" crossorigin="anonymous">
    <link rel="stylesheet" href="{{ $syntax.Permalink }}" integrity="{{ $syntax.Data.Integrity }}" crossorigin="anonymous">

```

Note that I am using the Monokai formatting for the highlight shortcode and it fails to bundle correctly for me so I have to keep it separate.

And for JavaScript, towards the bottom of the `<body>`:

```auto
    {{ $js := resources.Get "js/2016.js" | resources.Minify | resources.Fingerprint }}
    <script src="{{ $js.Permalink }}" integrity="{{ $js.Data.Integrity }}" crossorigin="anonymous"></script>

```

Worth noting that this is actually defined in my theme rather than the site itself. If using assets in a theme, you can choose whether to run Hugo against your theme (run it against the theme folder) in order to create the resources in the theme **or** you can get each site to create and commit the resources and that’s what I’m doing as it seems simpler to me. Both work just fine with the assets in the theme’s assets folder.

The theme is here in case you are interested:

> **[TotallyInformation/hugo-theme-twenty-sixteen](https://github.com/TotallyInformation/hugo-theme-twenty-sixteen)**
>
> A blog and information management theme for Hugo roughly based on the Wordpress Twenty Sixteen theme - TotallyInformation/hugo-theme-twenty-sixteen

---

_[View the full topic](https://discourse.gohugo.io/t/are-asset-pipelines-working-on-netlify-for-anyone/12953)._
