dotnet / dotnet/docfx

Linking from TOC into groups

Open
#7,207 0 comments 0 reactions 0 assignees View on GitHub
dotnet
Dominant language
C#
Stars
4.4k
Forks
890
Avg merge
2h 11m
Merged PRs (30d)
10

Description

To support multiple target frameworks, or group all the api reference by nuget-package, you have to use the "group" feature to avoid namespaces and class names to clash with each other.
That's all fine and dandy, but the problem then comes when trying to assembly it into a toc.
Now I want a toc.yml that points into on of the toc's in a group. However, it appears that because that yaml is in another group, the "non-grouped" yaml in the main part of the website now can't "see" these and link to them, and I get warnings like this:
[21-03-16 11:28:01.724]Warning:[BuildCore.Build Document.LinkPhaseHandlerWithIncremental.TocDocumentProcessor.Save](../../../../../output/docs/api/net5/toc.yml#L0)Invalid file link:(~/../../../../../output/docs/api/net5/MyPackageId/MyNameSpace.MyClass.yml).

The yaml file is at that location, but it's like the processor doesn't care since they are part of a different group.
I can't just remove the groups either, as the UIDs are not necessarily unique (multiple assemblies could reuse namespaces, or with multitargeting all classes will match), so things go bad there too, and links will get all messed up and point to the wrong one.

I generated a merged toc as well, but that doesn't help. as it can't point into the yaml that is part of a group.

How do you create a toc.yml that can link into a group?

**Operating System**: `Windows`
**DocFX Version Used**: 2.56.7

**Template used**: `default`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.