UNPKG

@mdfriday/foundry

Version:

The core engine of MDFriday. Convert Markdown and shortcodes into fully themed static sites – Hugo-style, powered by TypeScript.

19 lines (18 loc) 1.1 kB
export type LinkStrategy = 'absolute' | 'relative' | 'shortest'; export declare function splitAnchor(link: string): [string, string]; export declare function simplifySlug(fp: string): string; export declare function slugifyFilePath(fp: string, excludeExt?: boolean): string; export declare function transformInternalLink(link: string): string; export declare function pathToRoot(slug: string): string; export declare function resolveRelative(current: string, target: string): string; export declare function joinSegments(...args: string[]): string; export interface TransformOptions { strategy: LinkStrategy; allSlugs: string[]; } export declare function transformLink(src: string, target: string, opts: TransformOptions): string; export declare function isFolderPath(fplike: string): boolean; export declare function endsWith(s: string, suffix: string): boolean; export declare function trimSuffix(s: string, suffix: string): string; export declare function getFileExtension(s: string): string | undefined; export declare function stripSlashes(s: string, onlyStripPrefix?: boolean): string;