import { PluginSimple } from 'markdown-it'; interface BiDirectionalLinksOptions { /** * The directory to search for bi-directional links. * * @default cwd() - Current working directory */ dir?: string; /** * The base directory joined as href for bi-directional links. * * @default '/' */ baseDir?: string; /** * The glob patterns to search for bi-directional linked files. * * @default '*.md, *.png, *.jpg, *.jpeg, *.gif, *.svg, *.webp, *.ico, *.bmp, *.tiff, *.apng, *.avif, *.jfif, *.pjpeg, *.pjp, *.png, *.svg, *.webp, *.xbm, *.mp3, *.flac, *.wav, *.ogg, *.opus, *.mp4, *.webm, *.acc, *.mp4, *.webm, *.mov, *.mkv, *.ogg' */ includesPatterns?: string[]; /** * Excludes files added from `includePatterns` from being searched if it matches at least one of these patterns. * * @default '_*, dist, node_modules' */ excludesPatterns?: string[]; /** * Whether to include debugging logs. * * @default false */ debug?: boolean; /** * Whether to exclude the warning when no matched file is found. * * @default false */ noNoMatchedFileWarning?: boolean; /** * Generate an error link or a link to a specific page when no matched file is found. * * When you use this option, you should define a css style for * `.nolebase-route-link-invalid` (or `a[href="#"] {}`) to * distinguish the invalid link from the normal link. Such as: * `a.nolebase-route-link-invalid { color: red; opacity: 0.6; }` * * @default false */ stillRenderNoMatched?: boolean; /** * Force a relative path instead of an absolute path * * @default false */ isRelativePath?: boolean; } /** * A markdown-it plugin to support bi-directional links. * @param options - Options. * @param options.dir - The directory to search for bi-directional links. * @param options.baseDir - The base directory joined as href for bi-directional links. * @param options.includesPatterns - The glob patterns to search for bi-directional links. * @param options.excludesPatterns - The glob patterns to exclude files from search. * @returns A markdown-it plugin. */ declare const BiDirectionalLinks: (options?: BiDirectionalLinksOptions) => PluginSimple; export { BiDirectionalLinks }; export type { BiDirectionalLinksOptions };