Enabling Tera `builtins` feature

I’m not sure if I’m just missing something, or if this is not possible at all:

I would like to be able to generate a random number in my template.

In Tera, this seems to be possible, as described here. (Probably implemented after this?)
But the Tera docs state “Only available if the builtins feature is enabled.”
And when I try to use this, I get an error Filter 'get_random' not found.

I’m assuming this means that I somehow need to tell Zola to use Tera with the builtins feature enabled. But I do not see how - if at all - I could do this.

What version of zola are you using?

get_random works for me, for example {{ get_random(start=0, end=10000000000) }} printed 8554755875.

You shouldn’t need to tell Zola to enable builtins, so I’m thinking the issue is either a typo or an older version of zola.

Sorry for the late response, I somehow missed the notification.

I can’t say for sure what version I was running at the time, but now that I re-checked, this works indeed… I highly suspect it was some kind of error on my side.
Sorry about this.

However, what I noticed is: It does not generate a new random number when I refresh, only when the page re-builds. (And actually the same for {{ now() | date(format="%.f") }} or then I do a HTTP request to an API that returns random values.)
This effectively renders get_random useless for my use case.

Is there any way I can get a new random number each time I re-load the page?

If not, I guess I will have to resort to JavaScript in my template - but I’m afraid this can only turn out messy.

The page is only rebuilt if there has been changes, not if you refresh. In the end the output is static HTML file so if you need interactivity it will have to be in JS.