fix windows link index generation issue caused by backslashes

This commit is contained in:
Blake Allen 2021-10-23 14:18:14 -07:00
parent fcef39bb73
commit 7933665736

View File

@ -69,7 +69,7 @@ func parse(dir, pathPrefix string) []Link {
target := strings.Split(processTarget(target), "#")[0] target := strings.Split(processTarget(target), "#")[0]
fmt.Printf(" %s\n", target) fmt.Printf(" %s\n", target)
links = append(links, Link{ links = append(links, Link{
Source: hugoPathTrim(trim(dir, pathPrefix, ".md")), Source: filepath.ToSlash(hugoPathTrim(trim(dir, pathPrefix, ".md"))),
Target: target, Target: target,
Text: text, Text: text,
}) })