UNPKG

vuepress-theme-hope

Version:

A light vuepress theme with tons of features

47 lines (46 loc) 1.57 kB
import type { ThemeNormalPageFrontmatter } from "../../frontmatter/index.js"; import type { ThemePageData } from "../../page.js"; import type { SidebarOptions } from "../../sidebar.js"; export interface SidebarFileInfo { type: "file"; filename: string; title: string; order: number | null; path?: string | null; frontmatter: ThemeNormalPageFrontmatter; pageData: ThemePageData; } export interface SidebarDirInfo { type: "dir"; dirname: string; children: SidebarInfo[]; title: string; order: number | null; groupInfo: { icon?: string; expanded?: boolean; collapsible?: boolean; link?: string; }; frontmatter: ThemeNormalPageFrontmatter | null; pageData: ThemePageData | null; } export type SidebarInfo = SidebarFileInfo | SidebarDirInfo; export type SidebarSorterKeyword = "readme" | "order" | "date" | "date-desc" | "filename" | "title"; export type SidebarSorterFunction = (infoA: SidebarInfo, infoB: SidebarInfo) => number; export type SidebarSorter = SidebarSorterFunction | SidebarSorterKeyword | (SidebarSorterKeyword | SidebarSorterFunction)[]; export interface SidebarLocaleOptions { /** * Sidebar config * * Set to `false` to disable sidebar in current locale * * 侧边栏配置 * * 设置为 `false` 以在当前语言中禁用侧边栏 * * @see https://theme-hope.vuejs.press/guide/layout/sidebar.html * @see https://theme-hope.vuejs.press/zh/guide/layout/sidebar.html */ sidebar?: SidebarOptions; }