mirror of
https://github.com/pengzhanbo/vuepress-theme-plume.git
synced 2026-04-23 10:58:13 +08:00
chore: tweak
This commit is contained in:
parent
cb71585079
commit
93adb30012
@ -1,5 +1,5 @@
|
||||
import type { BlogPostDataItem } from '@vuepress-plume/plugin-blog-data'
|
||||
import type { PageCategoryData } from './page.js'
|
||||
import type { PageCategoryData } from './page-data.js'
|
||||
|
||||
export interface PlumeThemeBlogPostItem extends BlogPostDataItem {
|
||||
tags: string[]
|
||||
|
||||
24
theme/src/shared/frontmatter/friends.ts
Normal file
24
theme/src/shared/frontmatter/friends.ts
Normal file
@ -0,0 +1,24 @@
|
||||
export interface FriendsItem {
|
||||
name: string
|
||||
link: string
|
||||
avatar?: string
|
||||
desc?: string
|
||||
backgroundColor?: string | { light: string, dark: string }
|
||||
color?: string | { light: string, dark: string }
|
||||
nameColor?: string | { light: string, dark: string }
|
||||
borderColor?: string | { light: string, dark: string }
|
||||
}
|
||||
|
||||
export interface FriendGroup {
|
||||
title?: string
|
||||
desc?: string
|
||||
list?: FriendsItem[]
|
||||
}
|
||||
|
||||
export interface PlumeThemeFriendsFrontmatter {
|
||||
friends: boolean
|
||||
title?: string
|
||||
description?: string
|
||||
list?: FriendsItem[]
|
||||
groups?: FriendGroup[]
|
||||
}
|
||||
@ -1,8 +1,5 @@
|
||||
import type { WatermarkPluginFrontmatter } from '@vuepress/plugin-watermark'
|
||||
import type { ThemeImage, ThemeOutline } from './base.js'
|
||||
import type { NavItemWithLink } from './options/navbar.js'
|
||||
import type { ThemeImage } from '../base.js'
|
||||
|
||||
/* =============================== Home begin ==================================== */
|
||||
export interface PlumeThemeHomeFrontmatter extends Omit<PlumeThemeHomeBanner, 'type'> {
|
||||
home?: true
|
||||
config?: PlumeThemeHomeConfig[]
|
||||
@ -85,17 +82,17 @@ export interface PlumeThemeHomeFeature {
|
||||
|
||||
export type FeatureIcon = string | {
|
||||
src: string
|
||||
alt?: string | undefined
|
||||
width?: string | undefined
|
||||
height?: string | undefined
|
||||
wrap?: boolean | undefined
|
||||
alt?: string
|
||||
width?: string
|
||||
height?: string
|
||||
wrap?: boolean
|
||||
} | {
|
||||
light: string
|
||||
dark: string
|
||||
alt?: string | undefined
|
||||
width?: string | undefined
|
||||
height?: string | undefined
|
||||
wrap?: boolean | undefined
|
||||
alt?: string
|
||||
width?: string
|
||||
height?: string
|
||||
wrap?: boolean
|
||||
}
|
||||
|
||||
export interface PlumeThemeHomeProfile extends PlumeHomeConfigBase {
|
||||
@ -109,60 +106,3 @@ export interface PlumeThemeHomeProfile extends PlumeHomeConfigBase {
|
||||
export interface PlumeThemeHomeCustom extends PlumeHomeConfigBase {
|
||||
type: 'custom'
|
||||
}
|
||||
|
||||
/* =============================== Home end ==================================== */
|
||||
|
||||
export interface PlumeThemePageFrontmatter {
|
||||
home?: false
|
||||
comments?: boolean
|
||||
editLink?: boolean
|
||||
editLinkPattern?: string
|
||||
lastUpdated?: boolean
|
||||
contributors?: boolean
|
||||
prev?: string | NavItemWithLink
|
||||
next?: string | NavItemWithLink
|
||||
sidebar?: string | false
|
||||
aside?: boolean
|
||||
outline?: ThemeOutline
|
||||
backToTop?: boolean
|
||||
externalLink?: boolean
|
||||
readingTime?: boolean
|
||||
watermark?: WatermarkPluginFrontmatter['watermark'] & { fullPage?: boolean }
|
||||
}
|
||||
|
||||
export interface PlumeThemePostFrontmatter extends PlumeThemePageFrontmatter {
|
||||
createTime?: string
|
||||
author?: string
|
||||
tags?: string[]
|
||||
sticky?: boolean | number
|
||||
article?: boolean
|
||||
}
|
||||
|
||||
export interface PlumeThemeNoteFrontmatter extends PlumeThemePageFrontmatter {
|
||||
createTime?: string
|
||||
}
|
||||
|
||||
export interface FriendsItem {
|
||||
name: string
|
||||
link: string
|
||||
avatar?: string
|
||||
desc?: string
|
||||
backgroundColor?: string | { light: string, dark: string }
|
||||
color?: string | { light: string, dark: string }
|
||||
nameColor?: string | { light: string, dark: string }
|
||||
borderColor?: string | { light: string, dark: string }
|
||||
}
|
||||
|
||||
export interface FriendGroup {
|
||||
title?: string
|
||||
desc?: string
|
||||
list?: FriendsItem[]
|
||||
}
|
||||
|
||||
export interface PlumeThemeFriendsFrontmatter {
|
||||
friends: boolean
|
||||
title?: string
|
||||
description?: string
|
||||
list?: FriendsItem[]
|
||||
groups?: FriendGroup[]
|
||||
}
|
||||
4
theme/src/shared/frontmatter/index.ts
Normal file
4
theme/src/shared/frontmatter/index.ts
Normal file
@ -0,0 +1,4 @@
|
||||
export * from './page.js'
|
||||
export * from './home.js'
|
||||
export * from './post.js'
|
||||
export * from './friends.js'
|
||||
21
theme/src/shared/frontmatter/page.ts
Normal file
21
theme/src/shared/frontmatter/page.ts
Normal file
@ -0,0 +1,21 @@
|
||||
import type { WatermarkPluginFrontmatter } from '@vuepress/plugin-watermark'
|
||||
import type { ThemeOutline } from '../base.js'
|
||||
import type { NavItemWithLink } from '../navbar.js'
|
||||
|
||||
export interface PlumeThemePageFrontmatter {
|
||||
home?: false
|
||||
comments?: boolean
|
||||
editLink?: boolean
|
||||
editLinkPattern?: string
|
||||
lastUpdated?: boolean
|
||||
contributors?: boolean
|
||||
prev?: string | NavItemWithLink
|
||||
next?: string | NavItemWithLink
|
||||
sidebar?: string | false
|
||||
aside?: boolean
|
||||
outline?: ThemeOutline
|
||||
backToTop?: boolean
|
||||
externalLink?: boolean
|
||||
readingTime?: boolean
|
||||
watermark?: WatermarkPluginFrontmatter['watermark'] & { fullPage?: boolean }
|
||||
}
|
||||
9
theme/src/shared/frontmatter/post.ts
Normal file
9
theme/src/shared/frontmatter/post.ts
Normal file
@ -0,0 +1,9 @@
|
||||
import type { PlumeThemePageFrontmatter } from './page.js'
|
||||
|
||||
export interface PlumeThemePostFrontmatter extends PlumeThemePageFrontmatter {
|
||||
createTime?: string
|
||||
author?: string
|
||||
tags?: string[]
|
||||
sticky?: boolean | number
|
||||
article?: boolean
|
||||
}
|
||||
@ -1,5 +1,6 @@
|
||||
export * from './base.js'
|
||||
export * from './frontmatter.js'
|
||||
export * from './frontmatter/index.js'
|
||||
export * from './options/index.js'
|
||||
export * from './page.js'
|
||||
export * from './page-data.js'
|
||||
export * from './blog.js'
|
||||
export * from './navbar.js'
|
||||
|
||||
@ -35,5 +35,4 @@ export type PlumeThemeData = ThemeData<PlumeThemeLocaleData>
|
||||
|
||||
export * from './locale.js'
|
||||
export * from './plugins.js'
|
||||
export * from './navbar.js'
|
||||
export * from './encrypt.js'
|
||||
|
||||
@ -2,7 +2,7 @@ import type { LocaleData } from 'vuepress/core'
|
||||
import type { NotesDataOptions } from '@vuepress-plume/plugin-notes-data'
|
||||
import type { SocialLink, SocialLinkIconUnion, ThemeOutline } from '../base.js'
|
||||
import type { PlumeThemeBlog } from '../blog.js'
|
||||
import type { NavItem } from './navbar.js'
|
||||
import type { NavItem } from '../navbar.js'
|
||||
|
||||
export interface PlumeThemeLocaleData extends LocaleData {
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user