zola-theme-terminimal icon indicating copy to clipboard operation
zola-theme-terminimal copied to clipboard

Fail to build when the first menu item is different than $BASE_URL

Open Vloupmon opened this issue 2 years ago • 2 comments

If the URL of the first menu item in config.toml is not $BASE_URL, then the build will fail.

For example, this builds :

menu_items = [
    {name = "test", url = "$BASE_URL"},
]

This doesn't build :

menu_items = [
    {name = "test", url = "http://test.test"},
]

It can be worked around with a nameless menu entry :

menu_items = [
    {name = "", url = "$BASE_URL"},
]

Vloupmon avatar Apr 01 '22 16:04 Vloupmon

This definitely is a bug. Unfortunately I don't really have the time to fix that now. But having the workaround handy might definitely help other people using the theme, thanks!

If you'd be so kind to contribute the workaround to the README, I'd merge that happily.

pawroman avatar Apr 08 '22 07:04 pawroman

the pull request #19 fixes this for me:

Failed to build the site
Error: Failed to render page '/.../content/mypage/index.md'
Reason: Failed to render 'page.html': error while rendering macro `menu_macros::menu` (error happened in a parent template)
Reason: Variable `current_item` not found in context while rendering 'macros/menu.html'

jocutajar avatar Jun 23 '22 23:06 jocutajar