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

Children shortcode in root _index #180

Open
roccadev opened this issue Mar 14, 2019 · 2 comments
Open

Children shortcode in root _index #180

roccadev opened this issue Mar 14, 2019 · 2 comments

Comments

@roccadev
Copy link

I have a structure like:

<root>
    _index.md
    /foo/
        _index.md
        foo_one.md
        foo_two.md
    /bar/
        _index.md
        bar_one.md
        bar_two.md

If I use {{% children depth="999" %}} in the root /_index.md, I get:

  • foo
    • foo_one
    • foo_two
  • bar
    • bar_one
    • bar_two
  • foo_one
  • foo_two
  • bar_one
  • bar_two

That is, the sub-levels are repeated at the end of the menu as if they were top-levels.
This doesn't happen if the shortcode is not at the root level (i.e. inside foo/_index-md) or if page is set to a specific section.

Using up-to-date docdock and hugo v0.54.0/extended
I think it may be related to #142, though that's marked as solved.

@bmansheim
Copy link

@roccadev #142 is marked as solved because we found ways to tweak the shortcode to do what we want, and because it wasn't really a problem with that version of Hugo.

I suggested trying the tweaks listed there and seeing if you get your desired result.

@roccadev
Copy link
Author

Well, your workaround does fix the problem, I hoped for an official update but I guess I'll have to settle.
I'll leave this open though.

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