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

Fixes #69 Make file based menus behave as expected #70

Merged
merged 1 commit into from
Sep 4, 2019

Conversation

twohey
Copy link
Contributor

@twohey twohey commented Aug 29, 2019

- Fixes alex-shpak#69
- Section headings are listed once
- Sections and normal pages sort with the same weights amongst themselves
@alex-shpak
Copy link
Owner

HI!
I see the point about ordering, we just need to consider how much this breaking change will affect existing sites.
I didn't understand part about section headings listed twice? Can you please show an example.

@twohey
Copy link
Contributor Author

twohey commented Sep 1, 2019

If you look in the picture on the bug, you will see "Sub Section" listed twice in the menu. To be more concrete if the content/docs/ directory is:

$ tree content/docs/
content/docs/
└── A
    ├── B
    │   ├── _index.md
    │   └── articleB.md
    ├── _index.md
    └── articleA.md

2 directories, 4 files

Then you will see A and B listed twice:

bad listing

@alex-shpak
Copy link
Owner

alex-shpak commented Sep 1, 2019

Heh, I scanned picture twice before and missed it 😄

Although, on clean repo with disabled BookMenuBundle I don't get duplicate.
image

So maybe it's environment or hugo version difference. Can you please share your site config, OS and hugo version?
I like ordering change 👍, just want to find root of the problem.

@twohey
Copy link
Contributor Author

twohey commented Sep 2, 2019

I installed hugo on macOS 10.14.6 using brew.

$ uname -a
Darwin paul-air.local 18.7.0 Darwin Kernel Version 18.7.0: Tue Aug 20 16:57:14 PDT 2019; root:xnu-4903.271.2~2/RELEASE_X86_64 x86_64
$ hugo version
Hugo Static Site Generator v0.57.2/extended darwin/amd64 BuildDate: unknown

I believe the root of the issue is that Sections are Pages. So the original iteration over Sections listed them and then the Pages iteration also listed the section.

@alex-shpak
Copy link
Owner

Okay, I have 0.56.3 installed, I will try 0.57

@alex-shpak
Copy link
Owner

alex-shpak commented Sep 2, 2019

Yes, 0.57.2 creates extra 10 pages, for sections.

@alex-shpak
Copy link
Owner

I will merge this one and add comment about breaking changes in new version.
Thanks!

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.

File Tree menus list Sections multiple times
2 participants