chore: tweak

This commit is contained in:
pengzhanbo 2024-06-13 05:27:14 +08:00
parent cb71585079
commit 93adb30012
11 changed files with 72 additions and 74 deletions

View File

@ -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[]

View 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[]
}

View File

@ -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[]
}

View File

@ -0,0 +1,4 @@
export * from './page.js'
export * from './home.js'
export * from './post.js'
export * from './friends.js'

View 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 }
}

View 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
}

View File

@ -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'

View File

@ -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'

View File

@ -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 {
/**