Everything works fine on my home page, but I’m not sure what happens as I start adding posts (singles) to the website.
If I put an asset pipeline into baseof.html or a head partial that gets included everywhere, does the pipeline get re-executed (and hence the CSS get re-compiled / re-minified) for every page on the website?
Should I be trying to find a way to make sure that the pipeline only gets executed once?
I’m sure there’s a best-practice, I just don’t know what it is.
Best practice is to load a stylesheet resources in the head of a document, so when you change the one file, all the others still reference it by URI, but they don’t have to be updated.
When you update CSS for a website with 5000 pages, it should not affect those pages; changes gets rendered in the browser when a visitor loads your web resource.
There is a chance you are loading inline CSS inside each page, and if so, don’t.
What brought this to mind? If you aren’t affected adversely, what indicates this will be an issue for you in the future? Are you getting longer build times?
Sorry – I meant hugo best-practice. I understand how the CSS works when it’s deployed, my concern was related to any unexpected / unpredictable issues that may come up calling that asset pipeline over and over again thousands of times.
I’m trying to avoid rando calls at 2AM from someone telling me that my build scripts broke and I need to fix it
I had the same concerns when I implemented it. Doing SCSS/SASS or even worse PostCSS transformations tens of thousands of times would … not scale. 10000x1s is … 3 hours?