Skip to content

Commit 8328056

Browse files
committed
clean no pathname
1 parent c667bcb commit 8328056

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

docusaurus.config.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,8 +297,10 @@ module.exports = {
297297

298298
const parsedUrl = parse(node.url);
299299
const isUrlInternal = isInternal(parsedUrl);
300+
if (!parsedUrl.pathname) console.log({ parsedUrl, nodeTitle: node.title });
300301
const url = isUrlInternal ? `${config.absoluteUrl}${parsedUrl.pathname}.md` : node.url;
301302

303+
if (isUrlInternal && !parsedUrl.pathname) return '';
302304
if (node.title) return `[${node.title}](${url})`;
303305
return url;
304306
},

0 commit comments

Comments
 (0)