Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Menu rotating arrows not displayed #41

Closed
doolio opened this issue Jan 22, 2024 · 5 comments
Closed

Menu rotating arrows not displayed #41

doolio opened this issue Jan 22, 2024 · 5 comments

Comments

@doolio
Copy link

doolio commented Jan 22, 2024

The demo site has the following:

image

However, on a site I'm building I don't see these elements.

image

The only SCSS I override is the styles.scss file to introduce a _news.scss file which is based on the _blog.scss theme file.

I do have a home.scss file based on that from the Deep Casuality site but I don't think that is the issue because these arrows are visible on that site.

I presume these rotating arrows are driven by the _header.scss file but I have not overridden this file. Thanks for your time.

@thetwopct
Copy link
Collaborator

thetwopct commented Jan 23, 2024

Hard to give feedback without seeing the code tbh.

The arrows are attached to the class ".menu-item-has-children" - which is applied if the top menu item has children

<li class="top-menu-item{{ if .HasChildren }} menu-item-has-children{{ end }}">

.menu-item-has-children {

@doolio
Copy link
Author

doolio commented Jan 23, 2024

Thank you. I think my problem is I have my menus defined in a menus.yaml file (under a main: key) in the config/_default/ directory rather than under a menu: key in config/_default/languages.yaml.

@thetwopct
Copy link
Collaborator

thetwopct commented Jan 23, 2024

I see. The "menu:" in languages.yaml and the "menus" config file may be conflicting. Remove the menu: and its children from the language file. The existing code at L18 should still work if your file is in the _default config folder and called menus.yaml.

{{ with .Site.Menus.main }}

Oh and menus.yaml will need to be properly structured and indented, Hugo can be a bit tricky with that

@doolio
Copy link
Author

doolio commented Jan 23, 2024

Sorry I should have been more clear. I removed the menu: key and its children from the languages.yaml file and put its children starting from the main: key into a menus.yaml file (i.e. this file does not contain a menu: key). This I believe is in line with splitting one's config into separate files.

My site is not multi-lingual so I suppose I could remove the languages.yaml file entirely. I did remove the en: key from this file thinking that may resolve it as the Hugo docs describe menu files such as menus.en.yaml, menus.es.yaml etc. when a site is multilingual.

@thetwopct
Copy link
Collaborator

Marking this one as won't fix - our theme is opinionated and I can't see a way to make custom configs work without more people having this issue, although PRs are welcome if they cover both scenarios successfully.

@thetwopct thetwopct closed this as not planned Won't fix, can't repro, duplicate, stale May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants