mirror of
https://github.com/pengzhanbo/vuepress-theme-plume.git
synced 2026-04-23 10:58:13 +08:00
docs: 添加注释和说明文档
添加部分注释,部分说明文档.
This commit is contained in:
parent
d02fe5880b
commit
5dca5acb96
1
.vscode/settings.json
vendored
1
.vscode/settings.json
vendored
@ -19,6 +19,7 @@
|
||||
"cSpell.words": [
|
||||
"bumpp",
|
||||
"caniuse",
|
||||
"colours",
|
||||
"commitlint",
|
||||
"composables",
|
||||
"Docsearch",
|
||||
|
||||
@ -2,8 +2,8 @@
|
||||
"name": "docs",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"docs:build": "vuepress . build --clean-cache",
|
||||
"docs:clean": "rimraf . .vuepress/.temp .vuepress/.cache .vuepress/dist",
|
||||
"docs:build": "vuepress build --clean-cache",
|
||||
"docs:clean": "rimraf .vuepress/.temp .vuepress/.cache .vuepress/dist",
|
||||
"docs:dev": "vuepress dev --clean-cache",
|
||||
"docs:serve": "anywhere -s -h localhost -d .vuepress/dist"
|
||||
},
|
||||
|
||||
@ -1,5 +1,15 @@
|
||||
export type CanIUseMode = 'embed' | 'image'
|
||||
|
||||
/**
|
||||
* can-i-use plugin options
|
||||
*/
|
||||
export interface CanIUsePluginOptions {
|
||||
/**
|
||||
* 嵌入模式
|
||||
*
|
||||
* embed 通过iframe嵌入,提供可交互视图
|
||||
*
|
||||
* image 通过图片嵌入,静态
|
||||
*/
|
||||
mode: CanIUseMode
|
||||
}
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import type { PlumeThemeLocaleOptions } from '../shared'
|
||||
|
||||
export const defaultLocaleOption: Partial<PlumeThemeLocaleOptions> = {
|
||||
darkMode: true,
|
||||
home: { text: '首页', link: '/' },
|
||||
article: '/article',
|
||||
tag: { text: '标签', link: '/tag' },
|
||||
|
||||
@ -47,7 +47,7 @@ export const generateFrontmatter = (
|
||||
file.startsWith(path.join(notesDir.replace(/^\//, ''), note.dir))
|
||||
))
|
||||
) {
|
||||
return currentNote.text
|
||||
return currentNote.text || currentNote.dir
|
||||
}
|
||||
const basename = path.basename(filepath)
|
||||
if (isReadme(basename)) {
|
||||
|
||||
@ -1,6 +1,18 @@
|
||||
import {
|
||||
PlumeThemeNotesItem,
|
||||
PlumeThemeNotesOptions,
|
||||
PlumeThemeOptions,
|
||||
PlumeThemeSidebarConfigOptions,
|
||||
} from '../shared'
|
||||
import { themePlume } from './theme'
|
||||
export * from './theme'
|
||||
export * from '../shared'
|
||||
export * from './define'
|
||||
|
||||
export {
|
||||
PlumeThemeOptions,
|
||||
PlumeThemeNotesOptions,
|
||||
PlumeThemeNotesItem,
|
||||
PlumeThemeSidebarConfigOptions,
|
||||
}
|
||||
|
||||
export default themePlume
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user