Skip to content
This repository has been archived by the owner on Jun 10, 2023. It is now read-only.

When defining additional menus in config, menu.html and mobile-menu.html has errors #433

Open
grayside opened this issue Feb 10, 2023 · 0 comments

Comments

@grayside
Copy link

When additional menus are defined, the menu templates have errors.

  • The mobile menu shows as empty
  • The desktop template fails to compile

Example of error:

execute of template failed: template: partials/menu.html:4:16: executing "partials/menu.html" at <first $.Site.Params.showMenuItems $.Site.Menus.main>: error calling first: both limit and seq must be provided

Proposed Solution

My workaround is to wrap the full definition of each template in a conditional:

{{- if $.Site.Menus.main }}
...
{{ end -}}
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant