Closed animatabledotco closed 9 months ago
hi @animatabledotco
i was able to recreate this issue and i agree it is strange. thank you for reporting.
i will have to look into it to determine a root cause.
in the meantime, i see that you closed the issue. were you able to find a work-around? if so, can you please let me know what you did to fix it?
thanks!
hi @animatabledotco i was able to recreate this issue and i agree it is strange. thank you for reporting. i will have to look into it to determine a root cause. in the meantime, i see that you closed the issue. were you able to find a work-around? if so, can you please let me know what you did to fix it? thanks!
Hey there, thanks for replying. I found that in partials > side-nav > side-nav.html
there is {% if nav|length>1 %}
so I just removed that (and the corresponding {% endif %}
). I was going to post here but assumed it was all by design and customizing like this was something I should have grasped sooner.
hi @stevekirby
awesome! yes that makes sense. i believe i put the length conditional in there because i thought it would be silly to display the home page in the sidebar if that page was the only item in the navigation. it seemed redundant because the site_name
(displayed with a >
at the top left) already links to the home page. however i did not consider your use case where there is one top level section and no sibling pages.
your comment has inspired me to re-think the way the side navigation is rendered though. i am working on an update which will allow deeper nesting in the side bar. when i make this change i will also get rid of the length>1
conditional.
nav:
- Install: 'install.md'
nav:
- Tile Grid:
- Index: 'tile-grid/index.md'
- Tile Reference: 'tile-grid/tile.md'
- Grid Reference: 'tile-grid/grid.md'
- Pluglet Reference: 'tile-grid/pluglet.md'
- Example: 'tile-grid/examples/example-page.md'
- Image Only: 'tile-grid/examples/images-only.md'
- Link Only: 'tile-grid/examples/links-only.md'
- Override Styling: 'tile-grid/examples/override-styling.md'
- Inline Example: 'tile-grid/examples/inline.md'
- Elements:
- Blockquotes: 'elements/blockquotes.md'
- Buttons: 'elements/buttons.md'
- Definitions: 'elements/definitions.md'
- Figures: 'elements/figure.md'
- Footnotes: 'elements/footnotes.md'
- Links: 'elements/links.md'
- Lists: 'elements/lists.md'
- Tables: 'elements/table.md'
- Tooltips: 'elements/tooltips.md'
- Typography: 'elements/typography.md'
I would like to use a navigation structure that uses a single top-level document and several sub documents, like this:
But none of this shows up in the side navigation. Unless I add a second top-level document like this:
Is there a way to show the top and second level documents, even when there is only one top-level. Other themes seem to allow it. Thanks