Skip to content

Commit ae57321

Browse files
committed
fix: component Header creates undefined DocLink
1 parent a7a5181 commit ae57321

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/components/header/Header.astro

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,14 @@ export interface Props {
1010
}
1111
1212
const { lang, name, displayName, nolink } = Astro.props;
13-
const dest = `${lang}.headers.${name}`;
13+
const langPrefix = lang == "C" ? "/c" : "/cpp";
14+
const src = `${langPrefix}/library/headers/${name}`;
1415
1516
const extension = lang === "C" ? ".h" : "";
1617
const text = displayName ?? `<${name}${extension}>`;
1718
1819
const As = nolink ? Fragment : DocLink;
19-
const asProps = nolink ? {} : { dest };
20+
const asProps = nolink ? {} : { src };
2021
---
2122

2223
<As {...asProps}>

0 commit comments

Comments
 (0)