zola icon indicating copy to clipboard operation
zola copied to clipboard

[Feature Request] Build time hooks?

Open Animeshz opened this issue 1 year ago • 2 comments

I'd like to run a command (like for postcss/parcel-bundler) every zola build.

I know this would work if I just put the css build command before the zola build, but when you do zola serve, you're also listening to the changes to the directories. In which case multiple builds will be triggerred, and would be good if I'm able to run that command/hook every time that happens.

Animeshz avatar Jul 18 '22 14:07 Animeshz

In which case multiple builds will be triggerred,

Is it that bad? The Zola one should be fast.

Keats avatar Jul 19 '22 15:07 Keats

Sorry for ambiguous language... By multiple builds will be triggered I meant one build for each change which is what we'd expect.

I want to hook / know when that happens so post that I could do some cleanup or minification/expansion or whatever etc... :sweat_smile:

Animeshz avatar Jul 19 '22 16:07 Animeshz

We should probably find some way to group events rather than reacting to all of them. If we got 10 static assets that changed, we only need to react once, not 10 times.

Keats avatar Jan 12 '23 23:01 Keats