Best place to pass css/js pathnames from build tools?

Is the data folder the recommended place to pass css/js pathnames from a build tool?

What about development/production? I’d like to include some CDN’s for production builds. I guess I could have two different config files, but if I could somehow pass this value to the templates with the least amount of change, even better.

Thanks!

For your css/js bundles that your tool creates, put them in static which references to / of the site. If you have /path/to/static/css/mine.css, that is referenced at http://mysite.com/css/mine.css``.

There’s a hash that the build tool appends, so I need a way to pass them to the templates somehow. With my limited hugo knowledge, data seems the most convenient place to put in since I can just create a new file there. But I figured I’d ask for advice from the pros in the meantime.

I think I got it. The best way is to parse the config file and add them under the params field. The data folder just didn’t seem right for this thing.

Well, the data folder itself is for parsing hashes, so please have a look:

That site is not live yet, but I think the plan is to transition to it. There’s info about “data templates” in the original doc site too. Fyi.