Document links repect --out in .idx file (#19543)
* Link in .idx file now respects --out:file switch * Use clearer chained calls Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com>
This commit is contained in:
parent
0c915b5e47
commit
340b5a1676
1 changed files with 4 additions and 1 deletions
|
|
@ -1499,7 +1499,10 @@ proc genOutFile(d: PDoc, groupedToc = false): string =
|
||||||
# Extract the title. Non API modules generate an entry in the index table.
|
# Extract the title. Non API modules generate an entry in the index table.
|
||||||
if d.meta[metaTitle].len != 0:
|
if d.meta[metaTitle].len != 0:
|
||||||
title = d.meta[metaTitle]
|
title = d.meta[metaTitle]
|
||||||
let external = presentationPath(d.conf, AbsoluteFile d.filename).changeFileExt(HtmlExt).string.nativeToUnixPath
|
let external = AbsoluteFile(d.destFile)
|
||||||
|
.relativeTo(d.conf.outDir, '/')
|
||||||
|
.changeFileExt(HtmlExt)
|
||||||
|
.string
|
||||||
setIndexTerm(d[], external, "", title)
|
setIndexTerm(d[], external, "", title)
|
||||||
else:
|
else:
|
||||||
# Modules get an automatic title for the HTML, but no entry in the index.
|
# Modules get an automatic title for the HTML, but no entry in the index.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue