Migrating theme to v0.23.2 'Variable page is not defined'

I’m trying to migrate a theme to Zola v0.23.2. I’m new to this so I’m not quite sure how to debug the issue I’m having. When I try to build the site with zola build, I get the following error: Variable page is not defined. Available variables: config, lang, zola_version. The file that has the error is base.html. The page.html file extends base.html. Could this be an inheritance issue? Why did it work before?

Is there a new way to access the page variable? I couldn’t find anything about it in the v0.23.2 changelog or migration notes. There is a page.html template for the theme but for some reason Zola isn’t registering it like it did with v0.22.1.

Nope it’s still page it hasn’t changed. Are you on Windows by any chance?

No I’m on Linux (CachyOS).

I’m getting an error that may be related to yours. In my case it’s the config variable that is not visible inside a component:

ERROR Reason: error: Variable `config` is not defined. Available variables: main_title, page_title

Where main_title and page_title are the argument the component takes.

you need to pass it explicitly to the component How to handle fully global context? · Issue #996 · Keats/tera · GitHub

1 Like

That was the issue indeed, I totally missed it, thanks!