Skip to content

Commit faa0c1a

Browse files
committed
Fix bug when write relative folder in toc.yml (#357)
1 parent 69ae1f1 commit faa0c1a

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/Microsoft.DocAsCode.Build.TableOfContents/TocResolver.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33

44
namespace Microsoft.DocAsCode.Build.TableOfContents
55
{
6-
using System;
76
using System.Collections.Generic;
8-
using System.IO;
97

108
using Microsoft.DocAsCode.Common;
119
using Microsoft.DocAsCode.DataContracts.Common;
@@ -95,7 +93,7 @@ private TocItemInfo ResolveItemCore(TocItemInfo wrapper, Stack<FileAndType> stac
9593
}
9694
}
9795

98-
item.TocHref = tocFilePath;
96+
item.TocHref = tocFilePath - (RelativePath)file.File;
9997

10098
// Get homepage from the referenced toc
10199
if (string.IsNullOrEmpty(item.Homepage) && string.IsNullOrEmpty(item.HomepageUid))

0 commit comments

Comments
 (0)