How trigger reload yaml file

I’m writing a template based on metadata residing in a yaml file. The yaml file is read in lib and changes to the yaml file are intercepted locally. Problems arises putting the package on preview, changes to the yaml file are no longer intercepted. Is there a way to do this? Otherwise, having the yaml file read from main and passed to the template function will result in lib being completely rewritten …

Hi @voyager, I have moved your post to Questions and added a relevant tag; could you maybe try to revise your post’s title to be a complete question as per the question guidelines:

Good titles are questions you would ask your friend about Typst.

A good title makes the topic easier to grasp, increasing your chances of getting a good answer quickly.

But also, I think your post just needs a concrete example, including code that demonstrates the problem. I can mostly see what you’re talking about (and recommend you take a look at Why are paths always relative to the current file?), but I have no idea what “will result in lib being completely rewritten” means.

Thanks!