@neosjs/vitepress-theme
Version:
NeosJS VitePress theme
24 lines (23 loc) • 1.15 kB
TypeScript
import type { HeadConfig, PageData, SiteData } from 'vitepress';
import { inBrowser } from 'vitepress';
export declare const EXTERNAL_URL_RE: RegExp;
export declare const APPEARANCE_KEY = "neos-theme-appearance";
export declare const HASH_RE: RegExp;
export declare const EXT_RE: RegExp;
export { inBrowser };
export declare const notFoundPageData: PageData;
export declare function isActive(currentPath: string, matchPath?: string, asRegex?: boolean): boolean;
export declare function normalize(path: string): string;
export declare function isExternal(path: string): boolean;
/**
* this merges the locales data to the main data by the route
*/
export declare function resolveSiteDataByRoute(siteData: SiteData, relativePath: string): SiteData;
/**
* Create the page title string based on config.
*/
export declare function createTitle(siteData: SiteData, pageData: PageData): string;
export declare function mergeHead(prev: HeadConfig[], curr: HeadConfig[]): HeadConfig[];
export declare function sanitizeFileName(name: string): string;
export declare function slash(p: string): string;
export declare function escapeRegExp(str: string): string;