docs: 添加注释和说明文档

添加部分注释,部分说明文档.
This commit is contained in:
pengzhanbo 2022-05-01 14:40:48 +08:00
parent d02fe5880b
commit 5dca5acb96
7 changed files with 43 additions and 6 deletions

View File

@ -19,6 +19,7 @@
"cSpell.words": [
"bumpp",
"caniuse",
"colours",
"commitlint",
"composables",
"Docsearch",

View File

@ -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"
},

View File

@ -1,5 +1,15 @@
export type CanIUseMode = 'embed' | 'image'
/**
* can-i-use plugin options
*/
export interface CanIUsePluginOptions {
/**
*
*
* embed iframe嵌入
*
* image
*/
mode: CanIUseMode
}

View File

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

View File

@ -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)) {

View File

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

View File

@ -1,3 +1,16 @@
## vuepress-theme-plume
## @vuepress-plume/vuepress-theme-plume
开发中
一个简约的 vuepress 主题。
开箱即用,仅需少量配置即可使用。
### [查看文档](https://pengzhanbo.cn/note/vuepress-theme-plume)
### 注意
本主题基于 `VuePress2` ,仍处于 Beta 阶段。
这意味着功能尚未完善,在未来有概率发生破坏性更改。
本主题目前出于开发阶段中。