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

Breadcrumb with multiple linked toc.yml #944

Closed
pascalberger opened this issue Dec 1, 2016 · 4 comments
Closed

Breadcrumb with multiple linked toc.yml #944

pascalberger opened this issue Dec 1, 2016 · 4 comments

Comments

@pascalberger
Copy link
Member

I've created a documentation only with conceptual documents over different folders with several toc.yml linked together.
This works generally, but at some points down in the TOC the breadcrumb gets "reseted" (meaning it shows only the current page).

My structure looks like this:

\
  docfx.json
  toc.yml
  index.md
  \Folder1
    toc.yml
    index.md
    \Folder2
      \Folder3
        toc.yml
        index.md

Content of \toc.yml is:

- name Folder1
  href: Folder1/

Content of \Folder1\toc.yml is:

- name Introduction1
  href: index.md
- name Folder3
  href: Folder2/Folder3/

Content of \Folder1\Folder2\Folder3\toc.yml is:

- name Introduction3
  href: index.md

Folder1 is now as expected a navigation menu in the horizontal main navigation and links to /Folder1/index.html.
If I move there the breadcrumb is as expected Folder1 / Introduction1 and in the sidebar there are two navigation items:

  • Introduction linking to /Folder1/index.html
  • Folder 2 linking to /Folder1/Folder2/Folder3/index.html

But if I navigate further to /Folder1/Folder2/Folder3/index.html breadcrumb is Folder3
instead of the expected Folder1 / Folder3 / Introduction3.

Is there a way to get the breadcrumb as I would have expected it on this level?

@pascalberger
Copy link
Member Author

Not sure, but maybe this has todo with the limitation to one level navigations?

@superyyrrzz
Copy link
Contributor

Yes, you found the root cause... A workaround is to use TOC combination. You can try changing href: Folder2/Folder3/ in \Folder1\toc.yml to href: Folder2/Folder3/toc.yml.

@pascalberger
Copy link
Member Author

Thanks @superyyrrzz. Using TOC combination works for the use case described above, but still fails if going deeper in the navigation:

Assuming content of \Folder1\Folder2\Folder3\toc.yml is:

- name Introduction3
  href: index.md
- name Introduction4
  href: Folder4/toc.yml

And \Folder1\Folder2\Folder3\Folder4\toc.yml:

- name Introduction4
  href: index.md

If I navigate to /Folder1/Folder2/Folder3/Folder4/index.html breadcrumb is Folder1 / Folder 4 / Introduction4 instead of the expected Folder1 / Folder3 / Folder 4 / Introduction4.

@pascalberger
Copy link
Member Author

Thanks @superyyrrzz! Works now as expected applying the changes from #970

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