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

Navigation breaks when using href on Top-Level toc.yml #11

Open
hexxone opened this issue May 30, 2023 · 5 comments
Open

Navigation breaks when using href on Top-Level toc.yml #11

hexxone opened this issue May 30, 2023 · 5 comments

Comments

@hexxone
Copy link

hexxone commented May 30, 2023

So my top-level toc.yml looks like this:

- name: Home
  href: index.md
- name: Articles
  href: articles/toc.yml
- name: Documentation
  href: sdk/toc.yml
  homepage: sdk/My.Namespace.SDK.yml

when generating with the "modern" template this works correctly and creates dropdowns accordingly :

image

But it seems with this template there is weird behaviour on the Navigation and the sub-navigation disappears completely:

image

The weird thing is I didnt see any errors logged in the browser console..

But I will gladly provide more information. Let me know :)

@mikernet
Copy link
Member

mikernet commented Jun 2, 2023

I'll have a look at this, but have you tried using the folder path instead of the toc path, like so: https://github.com/Singulink/Singulink.IO.FileSystem/blob/master/Docs/toc.yml

@mikernet
Copy link
Member

mikernet commented Jun 2, 2023

Actually, I realize what the issue is here. Our template is designed for the first level of navigation to point to a folder, and once you click on that, the "subnavigation" appears below. Can you give that a try to see if that works for your scenario?

If you want/need multiple levels of main navigation in-place then I will need to decide how to handle that, i.e. showing it all in the nav or having a popup or whatnot.

@hexxone
Copy link
Author

hexxone commented Jun 4, 2023

Can you give that a try to see if that works for your scenario?

Yes, I can confirm that removing the "toc.yml" from the path fixed the navigation.

If you want/need multiple levels of main navigation in-place then I will need to decide how to handle that, i.e. showing it all in the nav or having a popup or whatnot.

No Problem, I think you could handle the "toc.yml" navigation the same as with "normal" subfolders specified :)
I just noticed the problem and wanted to let you know.

Cheers

@mikernet
Copy link
Member

mikernet commented Jun 4, 2023

Thanks :)

I will probably come up with a solution here with expandable main nav sections for people that want that so I'll leave this issue open until that is done. Might as well offer the flexibility.

@mikernet
Copy link
Member

This issue is open for someone to PR if they want to take a stab at it.

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