You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
P.s: I have just started with Hugo and I'm new to it. I tried to modify the layouts/partials/ to have another file named menu-short.html but I got the following error:
{{- range .Site.Menus.main }}
{{- if .HasChildren }}
<a href="{{ .URL | absLangURL }}" class="has-children">{{ .shortname }}</a>
<span class="sub-menu">
{{- range .Children }}
<a href="{{ .URL | absLangURL }}">{{ .shortname }}</a>
{{- end }}
</span>
{{- else }}
<a href="{{ .URL | absLangURL }}">{{ .shortname }}</a>
{{- end }}
{{- end }}
Rebuild failed:
Failed to render pages: render of "section" failed: execute of template failed: template: _default/list.html:2:3: executing "header" at <partialCached "header.html" .>: error calling partialCached: "/Users/mehrad/Documents/Personal Projects/Personal CV/PersonalSite/themes/hermit/layouts/partials/header.html:10:41": execute of template failed: template: partials/header.html:9:8: executing "partials/header.html" at <partialCached "menu-short.html" .>: error calling partialCached: "/Users/mehrad/Documents/Personal Projects/Personal CV/PersonalSite/themes/hermit/layouts/partials/menu-short.html:10:41": execute of template failed: template: partials/menu-short.html:10:41: executing "partials/menu-short.html" at <.ShortName>: can't evaluate field ShortName in type *navigation.MenuEntry
The text was updated successfully, but these errors were encountered:
Maybe Hugo just doesn't allow using other string for menu configs. I'm not sure about this as my understanding about Hugo is very limited. I would suggest you seek help at the official forum.
Issue:
The menus can be large multi-word text. Therefore in the mobile view they get bloated and even very large.
Suggestion:
I would like to propose that we have a tag under the
[[menu.main]]
in theconfig.toml
to have also short name for the sections.P.s: I have just started with Hugo and I'm new to it. I tried to modify the
layouts/partials/
to have another file namedmenu-short.html
but I got the following error:The text was updated successfully, but these errors were encountered: