I have some data in a yaml file. I want to calculate some values from this data, which I’ll then use in pages built from a template. So far I’ve been doing this sort of calculation in helpers but it involves a lot of repetition (e.g. the same calculation is made multiple times for one page) and is really a mis-use of helpers.

I’m looking for an alternative, better way of doing this. What I’d like to do is at build time process the data file and do the calculations once so that the results can just be read (as many times as necessary) when I build the pages.