Skip to content

Commit 15bfbbf

Browse files
committed
parse node url
1 parent 3069e64 commit 15bfbbf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

docusaurus.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
const { join, resolve } = require('node:path');
2+
const { parse } = require('node:url');
23

34
const clsx = require('clsx');
45
const { createApiPageMD, createInfoPageMD } = require('docusaurus-plugin-openapi-docs/lib/markdown');
@@ -292,7 +293,7 @@ module.exports = {
292293
remarkStringify: {
293294
handlers: {
294295
link: (node) => {
295-
const isUrlInternal = isInternal(node.url);
296+
const isUrlInternal = isInternal(parse(node.url));
296297
const url = isUrlInternal ? `${config.absoluteUrl}${node.url}.md` : node.url;
297298

298299
if (node.title) return `[${node.title}](${url})`;

0 commit comments

Comments
 (0)