create-vuepress-theme-plume 1.0.0-rc.149 → 1.0.0-rc.151

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.js CHANGED
@@ -13,7 +13,7 @@ import handlebars from "handlebars";
13
13
  import { osLocale } from "os-locale";
14
14
 
15
15
  //#region package.json
16
- var version = "1.0.0-rc.148";
16
+ var version = "1.0.0-rc.150";
17
17
 
18
18
  //#endregion
19
19
  //#region src/constants.ts
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "create-vuepress-theme-plume",
3
3
  "type": "module",
4
- "version": "1.0.0-rc.149",
4
+ "version": "1.0.0-rc.151",
5
5
  "description": "The cli for create vuepress-theme-plume's project",
6
6
  "author": "pengzhanbo <q942450674@outlook.com> (https://github.com/pengzhanbo/)",
7
7
  "license": "MIT",
@@ -1,3 +1,14 @@
1
+ /**
2
+ * 查看以下文档了解主题配置
3
+ * - @see https://theme-plume.vuejs.press/config/intro/ 配置说明
4
+ * - @see https://theme-plume.vuejs.press/config/theme/ 主题配置项
5
+ *
6
+ * 请注意,对此文件的修改都会重启 vuepress 服务。
7
+ * 部分配置项的更新没有必要重启 vuepress 服务,建议请在 `.vuepress/config.{{#if useTs}}ts{{else}}js{{/if}}` 文件中配置
8
+ *
9
+ * 特别的,请不要在两个配置文件中重复配置相同的项,当前文件的配置项会被覆盖
10
+ */
11
+
1
12
  import { {{ bundler }}Bundler } from '@vuepress/bundler-{{ bundler }}'
2
13
  import { defineUserConfig } from 'vuepress'
3
14
  import { plumeTheme } from 'vuepress-theme-plume'
@@ -118,7 +129,7 @@ export default defineUserConfig({
118
129
  // youtube: true, // 启用嵌入 youtube视频 语法 @[youtube](video_id)
119
130
  // artPlayer: true, // 启用嵌入 artPlayer 本地视频 语法 @[artPlayer](url)
120
131
  // audioReader: true, // 启用嵌入音频朗读功能 语法 @[audioReader](url)
121
- // icons: true, // 启用内置图标语法 ::icon-name::
132
+ // icon: { provider: 'iconify' }, // 启用内置图标语法 ::icon-name::
122
133
  // codepen: true, // 启用嵌入 codepen 语法 @[codepen](user/slash)
123
134
  // replit: true, // 启用嵌入 replit 语法 @[replit](user/repl-name)
124
135
  // codeSandbox: true, // 启用嵌入 codeSandbox 语法 @[codeSandbox](id)
@@ -1,3 +1,9 @@
1
+ /**
2
+ * @see https://theme-plume.vuejs.press/config/navigation/ 查看文档了解配置详情
3
+ *
4
+ * Navbar 配置文件,它在 `.vuepress/plume.config.{{#if useTs}}ts{{else}}js{{/if}}` 中被导入。
5
+ */
6
+
1
7
  import { defineNavbarConfig } from 'vuepress-theme-plume'
2
8
 
3
9
  {{#if multiLanguage}}
@@ -15,7 +21,7 @@ export const {{prefix}}Navbar = defineNavbarConfig([
15
21
 
16
22
  {{/each}}
17
23
  {{else}}
18
- export const navbar = defineNavbarConfig([
24
+ export default defineNavbarConfig([
19
25
  { text: '{{#if isEn}}Home{{else}}首页{{/if}}', link: '/' },
20
26
  { text: '{{#if isEn}}Blog{{else}}博客{{/if}}', link: '/blog/' },
21
27
  { text: '{{#if isEn}}Tags{{else}}标签{{/if}}', link: '/blog/tags/' },
@@ -1,3 +1,24 @@
1
+ /**
2
+ * @see https://theme-plume.vuejs.press/guide/document/ 查看文档了解配置详情。
3
+ *
4
+ * Notes 配置文件,它在 `.vuepress/plume.config.{{#if useTs}}ts{{else}}js{{/if}}` 中被导入。
5
+ *
6
+ * 请注意,你应该先在这里配置好 Notes,然后再启动 vuepress,主题会在启动 vuepress 时,
7
+ * 读取这里配置的 Notes,然后在与 Note 相关的 Markdown 文件中,自动生成 permalink。
8
+ *
9
+ * 如果你发现 侧边栏没有显示,那么请检查你的配置是否正确,以及 Markdown 文件中的 permalink
10
+ * 是否是以对应的 note 配置的 link 的前缀开头。 是否展示侧边栏是根据 页面链接 的前缀 与 `note.link`
11
+ * 的前缀是否匹配来决定。
12
+ */
13
+
14
+ /**
15
+ * 在受支持的 IDE 中会智能提示配置项。
16
+ *
17
+ * - `defineNoteConfig` 是用于定义单个 note 配置的帮助函数
18
+ * - `defineNotesConfig` 是用于定义 notes 集合的帮助函数
19
+ *
20
+ * 通过 `defineNoteConfig` 定义的 note 配置,应该填入 `defineNotesConfig` 的 notes 数组中
21
+ */
1
22
  import { defineNoteConfig, defineNotesConfig } from 'vuepress-theme-plume'
2
23
 
3
24
  {{#if multiLanguage}}
@@ -6,10 +27,21 @@ import { defineNoteConfig, defineNotesConfig } from 'vuepress-theme-plume'
6
27
 
7
28
  const {{ prefix }}DemoNote = defineNoteConfig({
8
29
  dir: 'demo',
30
+ // `dir` 所指向的目录中的所有 markdown 文件,其 permalink 需要以 `link` 配置作为前缀
31
+ // 如果 前缀不一致,则无法生成侧边栏。
32
+ // 所以请确保 markdown 文件的 permalink 都以 `link` 开头
9
33
  link: '/demo',
34
+ // 手动配置侧边栏结构
10
35
  sidebar: ['', 'foo', 'bar'],
36
+ // 根据文件结构自动生成侧边栏
37
+ // sidebar: 'auto',
11
38
  })
12
39
 
40
+ /**
41
+ * 导出所有的 note
42
+ * 每一个 note 都应该填入到 `notes.notes` 数组中
43
+ * ({{ prefix }}DemoNote 为参考示例,如果不需要它,请删除)
44
+ */
13
45
  export const {{ prefix }}Notes = defineNotesConfig({
14
46
  dir: '{{ removeLeadingSlash path }}notes',
15
47
  link: '{{ path }}',
@@ -20,11 +52,22 @@ export const {{ prefix }}Notes = defineNotesConfig({
20
52
  {{else}}
21
53
  const demoNote = defineNoteConfig({
22
54
  dir: 'demo',
55
+ // `dir` 所指向的目录中的所有 markdown 文件,其 permalink 需要以 `link` 配置作为前缀
56
+ // 如果 前缀不一致,则无法生成侧边栏。
57
+ // 所以请确保 markdown 文件的 permalink 都以 `link` 开头
23
58
  link: '/demo',
59
+ // 手动配置侧边栏结构
24
60
  sidebar: ['', 'foo', 'bar'],
61
+ // 根据文件结构自动生成侧边栏
62
+ // sidebar: 'auto',
25
63
  })
26
64
 
27
- export const notes = defineNotesConfig({
65
+ /**
66
+ * 导出所有的 note
67
+ * 每一个 note 都应该填入到 `notes.notes` 数组中
68
+ * (DemoNote 为参考示例,如果不需要它,请删除)
69
+ */
70
+ export default defineNotesConfig({
28
71
  dir: 'notes',
29
72
  link: '/',
30
73
  notes: [demoNote],
@@ -1,10 +1,22 @@
1
+ /**
2
+ * 查看以下文档了解主题配置
3
+ * - @see https://theme-plume.vuejs.press/config/intro/ 配置说明
4
+ * - @see https://theme-plume.vuejs.press/config/theme/ 主题配置项
5
+ *
6
+ * 请注意,对此文件的修改不会重启 vuepress 服务,而是通过热更新的方式生效
7
+ * 但同时部分配置项不支持热更新,请查看文档说明
8
+ * 对于不支持热更新的配置项,请在 `.vuepress/config.{{#if useTs}}ts{{else}}js{{/if}}` 文件中配置
9
+ *
10
+ * 特别的,请不要在两个配置文件中重复配置相同的项,当前文件的配置项会覆盖 `.vuepress/config.{{#if useTs}}ts{{else}}js{{/if}}` 文件中的配置
11
+ */
12
+
1
13
  import { defineThemeConfig } from 'vuepress-theme-plume'
2
14
  {{#if multiLanguage}}
3
15
  import { enNavbar, zhNavbar } from './navbar'
4
16
  import { enNotes, zhNotes } from './notes'
5
17
  {{else}}
6
- import { navbar } from './navbar'
7
- import { notes } from './notes'
18
+ import navbar from './navbar'
19
+ import notes from './notes'
8
20
  {{/if}}
9
21
 
10
22
  /**