Skip to content

Commit

Permalink
Use document relative to root when it is not aliased
Browse files Browse the repository at this point in the history
Co-authored-by: Didier Roche <[email protected]>
  • Loading branch information
jibel and didrocks committed Oct 26, 2023
1 parent 7f6d7cb commit 95ea9bd
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions internal/adsysservice/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,14 +124,13 @@ func docStructure(dir embed.FS, indexFilePath, parentChapterName string) (ordere
// foo/index -> we need to parse foo/index.md to get its title name and parse its tocs
// alias <bar> -> we open bar to get its title name for the reverse lookup, but also adds the alias.
alias, p, found := strings.Cut(t, "<")
p = filepath.Join(root, p)
if found {
p = strings.TrimSuffix(p, ">")
} else {
p = alias
}
p = filepath.Join(root, p) + ".md"

p = p + ".md"
title, err := titleFromPage(dir, p)
if err != nil {
return nil, nil, nil, err
Expand Down

0 comments on commit 95ea9bd

Please sign in to comment.