adidoks icon indicating copy to clipboard operation
adidoks copied to clipboard

Macros should not rely on outside variables

Open Keats opened this issue 3 years ago • 2 comments

Macros are meant to be pure functions (args) -> String. The fact that you can access config etc from inside is a pretty big bug in Tera and will very likely get fixed soonish. You should pass explicitly the arguments you need.

Keats avatar Dec 05 '21 09:12 Keats

You're right. I will make some updates next.

aaranxu avatar Dec 13 '21 17:12 aaranxu

I was not aware of this, will have to work on fixing abridge as well.

Hopefully zola build and zola serve will post some warning message about the intended functionality, otherwise users of many themes will be very surprised and scrambling to fix things.

I have added this to my todo list and will work on it soon.

Jieiku avatar Aug 18 '22 22:08 Jieiku