From 95ea9bdc5b5eaabd2b4c7368a8078e849e32f309 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Lallement Date: Thu, 26 Oct 2023 15:59:57 +0200 Subject: [PATCH] Use document relative to root when it is not aliased Co-authored-by: Didier Roche --- internal/adsysservice/doc.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/internal/adsysservice/doc.go b/internal/adsysservice/doc.go index 3cb3fad5d..c83f6a90d 100644 --- a/internal/adsysservice/doc.go +++ b/internal/adsysservice/doc.go @@ -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 -> 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