-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Fix issue where "children" shortcode only shows top level. #252
Conversation
Feel free to see it working on the deploy build: |
Limited testing shows it working except for when added to the "home" page, the initial This may be because of differences of how hugo treats that initial page. I do not understand everything well enough to know... What I am seeing is all pages listed as top level children even if depth="1". All appear as top level. |
Sorry for the lack of in depth testing, when I tested it I created a couple of nested chapters, this worked fine, however when you use pages it completely breaks. I will look at this over the next few days and update you when I have something. |
I have done some further testing and have pushed up a fix. @worthlutz I have done more testing this time and have created a repo to demonstrate this here this tests it using the following structure:
|
@Chris-Greaves, In the case where a sub-directory does not have an I seem to remember having read that the |
@worthlutz I believe that is the correct behaviour as Hugo classes the https://gohugo.io/content-management/sections/#nested-sections |
@Chris-Greaves I think that link must be what I read. Thanks for your work! I hope it gets merged soon. |
Hiya. Thanks very much for your contribution! I hope to include this fix in the next release. Haven't had chance to fully review the change yet, however I did notice something odd when visiting the deploy preview. On https://deploy-preview-252--learn.netlify.com/en/shortcodes/children/ the Any thoughts on what causes this? |
@matalo33 I don't have an idea why it would be doing that off the top of my head. I will investigate when I get home and let you know. |
… used on home page.
- Fixes a bug where the list items appear in a code block instead of as HTML
@matalo33 So I did a git rebase and that doesn't seem to have made any difference. I then ran it locally and it looks like the Live url Having a look at some of the other Pull Requests, it looks like its something with the netlify build. Possibly uses a different version of hugo? Looking at PR 259 you can see it also has it. https://deploy-preview-259--learn.netlify.com/en/shortcodes/ |
@matalo33 Any progress on this? |
Thanks, you are quite right this looks like an issue with the netlify build. Building locally with v0.54 doesn't break the menu ordering. Thanks very much for your MR @Chris-Greaves |
As Explained in PR 194, there is a bug in the children shortcode where it only returns the top level.
This pull request is to fix this issue.
Unlike PR 194, this fix works on 0.26