# Pre-build hooks

**URL:** <https://zola.discourse.group/t/pre-build-hooks/1576>\
**Category:** Support\
**Created:** [December 24, 2022, 9:03pm UTC](https://zola.discourse.group/t/pre-build-hooks/1576 "2022-12-24T21:03:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hoyland](https://avatars.discourse-cdn.com/v4/letter/h/ba9def/32.png) [@hoyland](https://zola.discourse.group/u/hoyland)\
**Post date:** [December 24, 2022, 9:03pm UTC](https://zola.discourse.group/t/pre-build-hooks/1576/1 "2022-12-24T21:03:00Z")

</div>

This is half a feature request and half a support request. I happily used Zola for my course website this past semester, building via a Github action and publishing to Github pages. The one bump I had was that towards the end of the semester, I made my students a grade calculator (a tiny little react app) and I couldn’t figure out a good way to incorporate that into the Zola build other than a Makefile. I’m curious if people have ideas on how to approach this–it seems like this is fundamentally the same problem faced by people using Tailwind, but I haven’t figured out what their pattern is.

It looks like the place to insert a hook of some kind would be [here](https://github.com/getzola/zola/blob/53ce6db057101b8a24631ac4212ab4f9f3d145ae/components/site/src/lib.rs#L685), but “check the config and shell out to run an arbitrary command” doesn’t seem like the best design, else I’d offer to do it.

---

<div class="post-metadata">

**Author:** ![keats](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@keats](https://zola.discourse.group/u/keats)\
**Post date:** [January 2, 2023, 3:15pm UTC](https://zola.discourse.group/t/pre-build-hooks/1576/2 "2023-01-02T15:15:17Z")

</div>

I would use a Makefile for any pre/post processing

---

<div class="post-metadata">

**Author:** ![hoyland](https://avatars.discourse-cdn.com/v4/letter/h/ba9def/32.png) [@hoyland](https://zola.discourse.group/u/hoyland)\
**Post date:** [January 2, 2023, 5:19pm UTC](https://zola.discourse.group/t/pre-build-hooks/1576/3 "2023-01-02T17:19:12Z")

</div>

I did actually find a reference to overriding the `build` command in `config.toml` (I think it was in an example/some blog post, rather than the documentation), but the Makefile approach is working just fine for me at the moment.
