Skip to content

Commit 751d168

Browse files
Elaborate on comment
1 parent c75c737 commit 751d168

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

packages/cursorless-org-docs/docusaurus.config.mts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,13 @@ function remarkPluginFixLinksToRepositoryArtifacts(): Transformer<Root> {
4646
dirname(fileURLToPath(import.meta.url)),
4747
"../..",
4848
);
49-
5049
const artifact = resolve(file.dirname!, url);
5150
const artifactRelative = relative(repoRoot, artifact).replace(/\\/g, "/");
5251
const fileRelative = relative(repoRoot, file.path).replace(/\\/g, "/");
5352

5453
// We host all files under docs, will resolve as a relative link, but
5554
// relative links passing between user and contributing are not resolved
56-
// correctly
55+
// correctly by docusaurus, so we need to rewrite them.
5756
if (
5857
(artifactRelative.startsWith(userRelative) &&
5958
fileRelative.startsWith(userRelative)) ||
@@ -63,7 +62,7 @@ function remarkPluginFixLinksToRepositoryArtifacts(): Transformer<Root> {
6362
return;
6463
}
6564

66-
node.url = repoLink.concat(artifactRelative);
65+
node.url = repoLink + artifactRelative;
6766
});
6867
};
6968
}

0 commit comments

Comments
 (0)