This is related to #4381 -- but is something I have been thinking about lately. We will eventually get some plugins/hooks that people can exploit, but the current "lazy processing resource" model is an easy model to understand, and it scales well.
I have been thinking about this in terms of "what would be the minimal set that would protect me against having to do to any npm install on my Hugo projects, i.e. fully native. The more I'm thinking about it, the more stupid it gets that I still do this for fairly plain tasks with slow JS software with a rather temperamental versioning system. So I intend to get this done fairly quick.
I will mentally limit myself to 5 tasks here. The NPM registry is enormous, so there will be use cases that does not fit with Hugo alone.
My 5 is:
- SASS/SCSS to CSS (this is the natural only choice, for tech reasons. And Bootstrap 4 is SCSS)
- Asset files concatenation (simple bundling of CSS, JS) (we would probably need some kind of assets directory for this)
- Minify (MIME type aware minification of JS, CSS)
- Digest (integrity hash, see https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity)
- Fingerprint (hash into the permalink, .e.g
main-88d4266fd4e6338d13b845fcf289579d209c897823b9217da3e161936f031589.css).
Without going into details in the above, could this match your workflow?


Update: The syntax of the above will be something like this:
$css := resource "main.scss" | resource.Sass | resource.Digest | resource.Fingerprint
Pick what you want. The above can also be used with the "bundled resources" in Page.
And of course Hugo-fast. Also see #4381 #
This is related to #4381 -- but is something I have been thinking about lately. We will eventually get some plugins/hooks that people can exploit, but the current "lazy processing resource" model is an easy model to understand, and it scales well.
I have been thinking about this in terms of "what would be the minimal set that would protect me against having to do to any
npm installon my Hugo projects, i.e. fully native. The more I'm thinking about it, the more stupid it gets that I still do this for fairly plain tasks with slow JS software with a rather temperamental versioning system. So I intend to get this done fairly quick.I will mentally limit myself to 5 tasks here. The NPM registry is enormous, so there will be use cases that does not fit with Hugo alone.
My 5 is:
main-88d4266fd4e6338d13b845fcf289579d209c897823b9217da3e161936f031589.css).Without going into details in the above, could this match your workflow?
Update: The syntax of the above will be something like this:
Pick what you want. The above can also be used with the "bundled resources" in
Page.And of course Hugo-fast. Also see #4381 #