MicrosoftDocs / CommunityToolkit

The Official Docs for the Community Toolkits
https://learn.microsoft.com/dotnet/communitytoolkit
Creative Commons Attribution 4.0 International
112 stars 91 forks source link

Fix Breadcrumbs File #54

Open michael-hawker opened 2 years ago

michael-hawker commented 2 years ago

There's a breadcrumbs file here:

https://github.com/MicrosoftDocs/CommunityToolkit/blob/main/docs/breadcrumb/toc.yml

Need to find the documentation link for this, but don't think we've set this up correctly with our new structure, so we should investigate.

davidbritch commented 2 years ago

https://review.docs.microsoft.com/en-us/help/onboard/admin/breadcrumb?branch=main

michael-hawker commented 2 years ago

Thanks @davidbritch, I noticed we had auto-generate to fill in the gaps as well. Though we may be using nested TOCs? I'm not sure what the difference is between multiple TOCs and nested ones, as the docs seemed to indicate both types existed.

Going to try a PR with some tweaks and see how that works to aid the generation maybe.

davidbritch commented 2 years ago

Not sure if this helps, but you can define multiple breadcrumb files, and then reference them from docfx.json e.g. in docfx/json:

      "breadcrumb_path": {
        "get-started/tutorials/**/*.yml": "/xamarin/breadcrumb/tutorials/toc.json",
        "get-started/tutorials/index.yml": "/xamarin/breadcrumb/subtoc_breadcrumb/toc.json",
        "xamarin-forms/creating-mobile-apps-xamarin-forms/**/*.md": "/xamarin/breadcrumb/subtoc_breadcrumb/toc.json",
        "xamarin-forms/enterprise-application-patterns/**/*.md": "/xamarin/breadcrumb/subtoc_breadcrumb/toc.json",
        "xamarin-forms/user-interface/graphics/skiasharp/**/*.md": "/xamarin/breadcrumb/subtoc_breadcrumb/toc.json"
      },

This was done in support of multiple TOCs. It's from the following repo if you want an example: https://github.com/MicrosoftDocs/xamarin-docs-pr

michael-hawker commented 2 years ago

Pointed out some of the current issues in #109.

I think ideally we want the main landing index to be able to show a list in the TOC of subpages across the toolkits.

Once you navigate into the Toolkit, that can be deeper/more specific to a particular toolkit (.NCT, MVVM, WCT, MAUI).

For instance on the MVVM introduction page we see this:

image

However, I would want to show the parent .NET Community Toolkit as part of the breadcrumb navigation underneath the Community Toolkits parent.

Digging into a doc underneath the MVVM Toolkit does at least show the MVVM Toolkit as the parent here:

image

Though the .NET Community Toolkit parent is still missing.