Skip to content

Commit

Permalink
chore: adjust default theme type
Browse files Browse the repository at this point in the history
  • Loading branch information
sanyuan0704 committed Oct 15, 2022
1 parent 14f814d commit 63cbbc3
Showing 1 changed file with 2 additions and 37 deletions.
39 changes: 2 additions & 37 deletions src/shared/types/default-theme.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
import { HeadConfig } from '.';

/**
* Modify from VitePress default theme
*/
export namespace DefaultTheme {
export interface Config {
/**
* The logo file of the site.
*
* @example '/logo.svg'
*/
logo?: ThemeableImage;
logo?: Image;

/**
* Custom site title in navbar. If the value is undefined,
Expand Down Expand Up @@ -129,35 +126,16 @@ export namespace DefaultTheme {
}

// image -----------------------------------------------------------------------

export type ThemeableImage = Image | { light: Image; dark: Image };
export type Image = string | { src: string; alt?: string };

// sidebar -------------------------------------------------------------------

export type Sidebar = SidebarMulti;

export interface SidebarMulti {
export interface Sidebar {
[path: string]: SidebarGroup[];
}

export interface SidebarGroup {
text?: string;
items: SidebarItem[];

/**
* If `true`, toggle button is shown.
*
* @default false
*/
collapsible?: boolean;

/**
* If `true`, collapsible group is collapsed by default.
*
* @default false
*/
collapsed?: boolean;
}

export type SidebarItem =
Expand Down Expand Up @@ -225,19 +203,6 @@ export namespace DefaultTheme {
copyright?: string;
}

// team ----------------------------------------------------------------------

export interface TeamMember {
avatar: string;
name: string;
title?: string;
org?: string;
orgLink?: string;
desc?: string;
links?: SocialLink[];
sponsor?: string;
}

// locales -------------------------------------------------------------------

export interface LocaleLinks {
Expand Down

0 comments on commit 63cbbc3

Please sign in to comment.