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

Find first section for chevron navigation #26

Merged

Conversation

blueyetisoftware-jason
Copy link
Contributor

No description provided.

@blueyetisoftware-jason
Copy link
Contributor Author

I wasn't sure how to sort by weight and also filter for only enable=true. I tried something similar to this using where but wasn't able to get it to work.
https://discourse.gohugo.io/t/solved-sort-and-where-in-a-range-site-data/8225/2

layouts/partials/home.html Outdated Show resolved Hide resolved
@hossainemruz
Copy link
Member

hossainemruz commented Jul 2, 2020

@blueyetisoftware I have pushed a change. Previously, the disabled sections was not handled properly. For example, if About section is disabled using section.enable: false it will be still present in the sorted map. Hence, the chevron was pointing to the about section.

Now, I have filtered the disabled sections using where function.

@hossainemruz hossainemruz merged commit 8658773 into hugo-toha:master Jul 2, 2020
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

Successfully merging this pull request may close these issues.

2 participants