vjeantet / hugo-theme-docdock

Declination of @matcornic Learn theme to Hugo

Home Page:https://docdock.netlify.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Children shortcode in root _index

roccadev opened this issue · comments

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.

@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.

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.