[Bug] DocFx is not working with multiple projects with seperate metadata
- Dominant language
- C#
- Stars
- 4.4k
- Forks
- 890
- Avg merge
- 2h 9m
- Merged PRs (30d)
- 11
Description
**Describe the bug**
When docfx.json has multiple projects added, the generated toc.html file is incorrect.
Eg. docfx.json
```
{
"metadata": [
{
"src": [
{
"src": "../..",
"files": [
"RailwayOrientedProgramming/src/RailwayOrientedProgramming.csproj"
]
}
],
"dest": "api/rop"
},
{
"src": [
{
"src": "../..",
"files": [
"DomainDrivenDesign/src/DomainDrivenDesign.csproj"
]
}
],
"dest": "api/domain"
},
```
**To Reproduce**
Steps to reproduce the behavior:
1. Clone repro https://github.com/xavierjohn/FunctionalDDD.git
2. checkout branch `docfx_multiple_projects_not_working`
3. go to folder docs and run `hostdoclocally.cmd`
Note the generated HTML file has the same incorrect **href** with the same value. The **name** and **title** attributes are correct.
FunctionalDDD\docs\docfx_project\_site\api\toc.html
```
Railway Oriented Programming
Domain Driven Design
Common Value Objects
ASP Extensions
Fluent Validation
```
**Expected behavior**
The generated html file should have the correct href set
eg.
```
Railway Oriented Programming
Domain Driven Design
Common Value Objects
ASP Extensions
Fluent Validation
```
**Context (please complete the following information):**
- OS: Windows
- Docfx version: 2.70.3+3968fc5e92ebc2e4a2d97df0105000af2ec7eb82
**Additional context**
I am trying to add a level for each of my assembly in the documentation.
Similar to this issue https://github.com/dotnet/docfx/issues/1711
Contributor guide
Assessment
This issue has not been assessed yet.