Skip to content

Commit 2b694a7

Browse files
committed
feat: add skipLinkFileCheck option
1 parent f74f1eb commit 2b694a7

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/transform/plugins/links/index.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ function processLink(
137137
log,
138138
getPublicPath = getDefaultPublicPath,
139139
cache,
140+
skipLinkFileCheck = false,
140141
} = opts;
141142

142143
const currentPath = state.env.path || startPath;
@@ -163,7 +164,7 @@ function processLink(
163164

164165
if (pathname) {
165166
file = resolve(path.parse(currentPath).dir, pathname);
166-
fileExists = isFileExists(file);
167+
fileExists = skipLinkFileCheck || isFileExists(file);
167168
isPageFile = PAGE_LINK_REGEXP.test(pathname);
168169

169170
if (isPageFile && !fileExists) {

src/transform/typings.ts

+1
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ export interface MarkdownItPluginOpts {
8989
vars?: Record<string, string>;
9090
extractTitle?: boolean;
9191
disableLiquid?: boolean;
92+
skipLinkFileCheck?: boolean;
9293
}
9394

9495
export type MarkdownItPluginCb<T extends {} = {}> = {

0 commit comments

Comments
 (0)