myst-cli
Version:
Command line tools for MyST
40 lines • 1.17 kB
TypeScript
export type PageSlugs = Record<string, number>;
/** Valid heading levels are 1-6 and default behavior only uses these.
*
* However -1 and 0 may also be set for part/chapter
*/
export type PageLevels = -1 | 0 | 1 | 2 | 3 | 4 | 5 | 6;
export type LocalProjectFolder = {
title: string;
level: PageLevels;
};
export type LocalProjectPage = {
file: string;
slug: string;
level: PageLevels;
/** Optional short_title override from the TOC entry */
title?: string;
/** Flag to mark if the page is implied from a TOC pattern or folder structure */
implicit?: boolean;
};
export type ExternalURL = {
url: string;
title: string;
level: PageLevels;
open_in_same_tab?: boolean;
};
export type LocalProject = {
path: string;
/** The local path to the local index file. */
file: string;
/** The slug that the index get's renamed to for the JSON */
index: string;
implicitIndex?: boolean;
bibliography: string[];
pages: (LocalProjectPage | LocalProjectFolder | ExternalURL)[];
};
export type SlugOptions = {
projectPath?: string;
urlFolders?: boolean;
};
//# sourceMappingURL=types.d.ts.map