File tree Expand file tree Collapse file tree 6 files changed +31
-12
lines changed
plugins/markdown/plugin-markdown-preview/src Expand file tree Collapse file tree 6 files changed +31
-12
lines changed Original file line number Diff line number Diff line change @@ -97,9 +97,7 @@ document.querySelector('body').innerText = 'Hello world!'
97
97
}
98
98
```
99
99
100
- - Details:
101
-
102
- Locales configuration for ` <VPPreview> ` .
100
+ - Details: Locales configuration for ` <VPPreview> ` .
103
101
104
102
## Styles
105
103
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ export default {
49
49
```` md
50
50
<VPPreview title="可选标题">
51
51
<template #content>
52
- <!-- 你的内容在这里 -->
52
+ <!-- 你的内容在这里 -->
53
53
54
54
Hello world!
55
55
@@ -67,7 +67,7 @@ document.querySelector('body').innerText = 'Hello world!'
67
67
68
68
<VPPreview title =" 可选标题 " >
69
69
<template #content>
70
- <!-- 你的内容在这里 -->
70
+ <!-- 你的内容在这里 -->
71
71
72
72
Hello world!
73
73
@@ -91,15 +91,15 @@ document.querySelector('body').innerText = 'Hello world!'
91
91
``` ts
92
92
export interface MarkdownPreviewLocaleData {
93
93
/**
94
- * 切换代码按钮文本
94
+ * Toggle code button text
95
+ *
96
+ * 切换代码按钮文字
95
97
*/
96
98
toggle: string
97
99
}
98
100
```
99
101
100
- - 详细信息:
101
-
102
- ` <VPPreview> ` 的多语言配置。
102
+ - 详情:` <VPPreview> ` 的本地化配置。
103
103
104
104
## 样式
105
105
Original file line number Diff line number Diff line change 1
1
export * from './markdownPreviewPlugin.js'
2
+ export type * from './options.js'
2
3
export * from './preview.js'
Original file line number Diff line number Diff line change @@ -10,6 +10,24 @@ const PLUGIN_NAME = '@vuepress/plugin-markdown-preview'
10
10
11
11
const __dirname = getDirname ( import . meta. url )
12
12
13
+ /**
14
+ * Markdown preview plugin
15
+ *
16
+ * Markdown 预览插件
17
+ *
18
+ * @param options - plugin options / 插件选项
19
+ *
20
+ * @example
21
+ * ```ts
22
+ * import { markdownPreviewPlugin } from '@vuepress/plugin-markdown-preview'
23
+ *
24
+ * export default {
25
+ * plugins: [
26
+ * markdownPreviewPlugin(),
27
+ * ],
28
+ * }
29
+ * ```
30
+ */
13
31
export const markdownPreviewPlugin =
14
32
( options : MarkdownPreviewPluginOptions = { } ) : Plugin =>
15
33
( app ) => ( {
Original file line number Diff line number Diff line change @@ -3,9 +3,9 @@ import type { MarkdownPreviewPluginLocaleData } from '../shared/index.js'
3
3
4
4
export interface MarkdownPreviewPluginOptions {
5
5
/**
6
- * Localization config
6
+ * Localization config for preview component
7
7
*
8
- * 本地化配置
8
+ * 预览组件的本地化配置
9
9
*/
10
10
locales ?: LocaleConfig < MarkdownPreviewPluginLocaleData >
11
11
}
Original file line number Diff line number Diff line change @@ -2,7 +2,9 @@ import type { ExactLocaleConfig } from '@vuepress/helper'
2
2
3
3
export interface MarkdownPreviewPluginLocaleData {
4
4
/**
5
- * toggle code button text
5
+ * Toggle code button text
6
+ *
7
+ * 切换代码按钮文字
6
8
*/
7
9
toggle : string
8
10
}
You can’t perform that action at this time.
0 commit comments