create-vuepress-theme-plume 1.0.0-rc.91
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/LICENSE +21 -0
- package/README.md +14 -0
- package/bin/index.js +2 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +506 -0
- package/package.json +43 -0
- package/templates/.vuepress/client.ts.handlebars +12 -0
- package/templates/.vuepress/config.ts.handlebars +90 -0
- package/templates/.vuepress/navbar.ts.handlebars +28 -0
- package/templates/.vuepress/notes.ts.handlebars +32 -0
- package/templates/.vuepress/plume.config.ts.handlebars +57 -0
- package/templates/.vuepress/public/plume.svg +8 -0
- package/templates/.vuepress/theme/components/Custom.vue +11 -0
- package/templates/.vuepress/theme/shim.d.ts +6 -0
- package/templates/.vuepress/theme/styles/custom.css +50 -0
- package/templates/common/README.md.handlebars +57 -0
- package/templates/common/README.zh-CN.md.handlebars +57 -0
- package/templates/deploy/github/.github/workflows/deploy.yml.handlebars +70 -0
- package/templates/deploy/netlify/netlify.toml.handlebars +9 -0
- package/templates/deploy/vercel/vercel.json.handlebars +6 -0
- package/templates/docs/en/README.md.handlebars +22 -0
- package/templates/docs/en/notes/demo/README.md +6 -0
- package/templates/docs/en/notes/demo/bar.md +5 -0
- package/templates/docs/en/notes/demo/foo.md +5 -0
- package/templates/docs/en/preview/custom-component.example.md +8 -0
- package/templates/docs/en/preview/markdown.md +312 -0
- package/templates/docs/zh/README.md.handlebars +22 -0
- package/templates/docs/zh/notes/demo/README.md +6 -0
- package/templates/docs/zh/notes/demo/bar.md +5 -0
- package/templates/docs/zh/notes/demo/foo.md +5 -0
- package/templates/docs/zh/preview/custom-component.example.md +8 -0
- package/templates/docs/zh/preview/markdown.md +312 -0
- package/templates/git/.gitattributes.handlebars +10 -0
- package/templates/git/.gitignore.handlebars +8 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { defineNavbarConfig } from 'vuepress-theme-plume'
|
|
2
|
+
|
|
3
|
+
{{#if multiLanguage}}
|
|
4
|
+
{{#each locales}}
|
|
5
|
+
export const {{prefix}}Navbar = defineNavbarConfig([
|
|
6
|
+
{ text: '{{#if isEn}}Home{{else}}首页{{/if}}', link: '{{ path }}' },
|
|
7
|
+
{ text: '{{#if isEn}}Blog{{else}}博客{{/if}}', link: '{{ path }}blog/' },
|
|
8
|
+
{ text: '{{#if isEn}}Tags{{else}}标签{{/if}}', link: '{{ path }}blog/tags/' },
|
|
9
|
+
{ text: '{{#if isEn}}Archives{{else}}归档{{/if}}', link: '{{ path }}blog/archives/' },
|
|
10
|
+
{
|
|
11
|
+
text: '{{#if isEn}}Notes{{else}}笔记{{/if}}',
|
|
12
|
+
items: [{ text: '{{#if isEn}}Demo{{else}}示例{{/if}}', link: '{{ path }}notes/demo/README.md' }]
|
|
13
|
+
},
|
|
14
|
+
])
|
|
15
|
+
|
|
16
|
+
{{/each}}
|
|
17
|
+
{{else}}
|
|
18
|
+
export const navbar = defineNavbarConfig([
|
|
19
|
+
{ text: '{{#if isEn}}Home{{else}}首页{{/if}}', link: '/' },
|
|
20
|
+
{ text: '{{#if isEn}}Blog{{else}}博客{{/if}}', link: '/blog/' },
|
|
21
|
+
{ text: '{{#if isEn}}Tags{{else}}标签{{/if}}', link: '/blog/tags/' },
|
|
22
|
+
{ text: '{{#if isEn}}Archives{{else}}归档{{/if}}', link: '/blog/archives/' },
|
|
23
|
+
{
|
|
24
|
+
text: '{{#if isEn}}Notes{{else}}笔记{{/if}}',
|
|
25
|
+
items: [{ text: '{{#if isEn}}Demo{{else}}示例{{/if}}', link: '/notes/demo/README.md' }]
|
|
26
|
+
},
|
|
27
|
+
])
|
|
28
|
+
{{/if}}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { defineNoteConfig, defineNotesConfig } from 'vuepress-theme-plume'
|
|
2
|
+
|
|
3
|
+
{{#if multiLanguage}}
|
|
4
|
+
{{#each locales}}
|
|
5
|
+
/* =================== locale: {{ lang }} ======================= */
|
|
6
|
+
|
|
7
|
+
const {{ prefix }}DemoNote = defineNoteConfig({
|
|
8
|
+
dir: 'demo',
|
|
9
|
+
link: '/demo',
|
|
10
|
+
sidebar: ['', 'foo', 'bar'],
|
|
11
|
+
})
|
|
12
|
+
|
|
13
|
+
export const {{ prefix }}Notes = defineNotesConfig({
|
|
14
|
+
dir: '{{ removeLeadingSlash path }}notes',
|
|
15
|
+
link: '{{ path }}',
|
|
16
|
+
notes: [{{ prefix }}DemoNote],
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
{{/each}}
|
|
20
|
+
{{else}}
|
|
21
|
+
const demoNote = defineNoteConfig({
|
|
22
|
+
dir: 'demo',
|
|
23
|
+
link: '/demo',
|
|
24
|
+
sidebar: ['', 'foo', 'bar'],
|
|
25
|
+
})
|
|
26
|
+
|
|
27
|
+
export const notes = defineNotesConfig({
|
|
28
|
+
dir: 'notes',
|
|
29
|
+
link: '/',
|
|
30
|
+
notes: [demoNote],
|
|
31
|
+
})
|
|
32
|
+
{{/if}}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { defineThemeConfig } from 'vuepress-theme-plume'
|
|
2
|
+
{{#if multiLanguage}}
|
|
3
|
+
import { enNavbar, zhNavbar } from './navbar'
|
|
4
|
+
import { enNotes, zhNotes } from './notes'
|
|
5
|
+
{{else}}
|
|
6
|
+
import { navbar } from './navbar'
|
|
7
|
+
import { notes } from './notes'
|
|
8
|
+
{{/if}}
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* @see https://theme-plume.vuejs.press/config/basic/
|
|
12
|
+
*/
|
|
13
|
+
export default defineThemeConfig({
|
|
14
|
+
logo: 'https://theme-plume.vuejs.press/plume.png',
|
|
15
|
+
// your git repo url
|
|
16
|
+
docsRepo: '',
|
|
17
|
+
docsDir: '{{ docsDir }}',
|
|
18
|
+
|
|
19
|
+
appearance: true,
|
|
20
|
+
|
|
21
|
+
{{#unless multiLanguage}}
|
|
22
|
+
profile: {
|
|
23
|
+
avatar: 'https://theme-plume.vuejs.press/plume.png',
|
|
24
|
+
name: '{{ siteName }}',
|
|
25
|
+
description: '{{ siteDescription }}',
|
|
26
|
+
// circle: true,
|
|
27
|
+
// location: '',
|
|
28
|
+
// organization: '',
|
|
29
|
+
},
|
|
30
|
+
|
|
31
|
+
navbar,
|
|
32
|
+
notes,
|
|
33
|
+
{{/unless}}
|
|
34
|
+
social: [
|
|
35
|
+
{ icon: 'github', link: '/' },
|
|
36
|
+
],
|
|
37
|
+
|
|
38
|
+
{{#if multiLanguage}}
|
|
39
|
+
locales: {
|
|
40
|
+
{{#each locales}}
|
|
41
|
+
'{{ path }}': {
|
|
42
|
+
profile: {
|
|
43
|
+
avatar: 'https://theme-plume.vuejs.press/plume.png',
|
|
44
|
+
name: '{{ ../siteName }}',
|
|
45
|
+
description: '{{ ../siteDescription }}',
|
|
46
|
+
// circle: true,
|
|
47
|
+
// location: '',
|
|
48
|
+
// organization: '',
|
|
49
|
+
},
|
|
50
|
+
|
|
51
|
+
navbar: {{ prefix }}Navbar,
|
|
52
|
+
notes: {{ prefix }}Notes,
|
|
53
|
+
},
|
|
54
|
+
{{/each}}
|
|
55
|
+
},
|
|
56
|
+
{{/if}}
|
|
57
|
+
})
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 72 72">
|
|
2
|
+
<path fill="#5086a1" d="M42.334 49.147a29.945 29.945 0 0 1-19.338-8.151c-8.014-7.365-8.378-18.076-8.533-22.649l-.022-.627a2.904 2.904 0 0 1 3.457-2.951c17.005 3.355 21.695 16.324 22.056 17.4a49.543 49.543 0 0 1 3.574 15.922a1 1 0 0 1-.967 1.052c-.029.001-.106.004-.227.004" />
|
|
3
|
+
<path fill="#8cccd5" d="M44.436 55.316c-11.646 0-17.376-6.974-17.653-7.354a1 1 0 0 1 .262-1.424a11.103 11.103 0 0 1 12.774-1.574c-1.465-9.078 1.877-13.568 2.031-13.77a.998.998 0 0 1 .75-.39a.97.97 0 0 1 .78.325c8.944 9.771 8.793 16.532 7.908 19.691c-.034.14-1.062 4.092-4.772 4.406c-.711.062-1.405.09-2.08.09" />
|
|
4
|
+
<g fill="none" stroke="#333" stroke-linecap="round" stroke-linejoin="round" stroke-width="1">
|
|
5
|
+
<path d="M55.184 57.69S34.96 45.877 23.097 24.206m22.131 30.096c-11.93.46-17.628-6.88-17.628-6.88" />
|
|
6
|
+
<path d="M40.528 42.483c-.56-7.195 2.116-10.679 2.116-10.679c8.834 9.654 8.406 16.162 7.681 18.747m-13.311-3.129a30.15 30.15 0 0 1-13.341-7.162c-8.072-7.419-8.067-18.241-8.232-22.577a1.903 1.903 0 0 1 2.264-1.932C34.694 19.103 39.02 32.528 39.02 32.528" />
|
|
7
|
+
</g>
|
|
8
|
+
</svg>
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
/** 主题颜色 */
|
|
3
|
+
|
|
4
|
+
/*
|
|
5
|
+
--vp-c-brand-1: #5086a1;
|
|
6
|
+
--vp-c-brand-2: #6aa1b7;
|
|
7
|
+
--vp-c-brand-3: #8cccd5;
|
|
8
|
+
--vp-c-brand-soft: rgba(131, 208, 218, 0.314);
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/** 背景颜色 */
|
|
12
|
+
|
|
13
|
+
/*
|
|
14
|
+
--vp-c-bg: #fff;
|
|
15
|
+
--vp-c-bg-alt: #f6f6f7;
|
|
16
|
+
--vp-c-bg-elv: #fff;
|
|
17
|
+
--vp-c-bg-soft: #f6f6f7;
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
/** 文本颜色 */
|
|
21
|
+
|
|
22
|
+
/*
|
|
23
|
+
--vp-c-text-1: rgba(60, 60, 67);
|
|
24
|
+
--vp-c-text-2: rgba(60, 60, 67, 0.78);
|
|
25
|
+
--vp-c-text-3: rgba(60, 60, 67, 0.56);
|
|
26
|
+
*/
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/** 深色模式 */
|
|
30
|
+
.dark {
|
|
31
|
+
/*
|
|
32
|
+
--vp-c-brand-1: #8cccd5;
|
|
33
|
+
--vp-c-brand-2: #6aa1b7;
|
|
34
|
+
--vp-c-brand-3: #5086a1;
|
|
35
|
+
--vp-c-brand-soft: rgba(131, 208, 218, 0.314);
|
|
36
|
+
*/
|
|
37
|
+
|
|
38
|
+
/*
|
|
39
|
+
--vp-c-bg: #1b1b1f;
|
|
40
|
+
--vp-c-bg-alt: #161618;
|
|
41
|
+
--vp-c-bg-elv: #202127;
|
|
42
|
+
--vp-c-bg-soft: #202127;
|
|
43
|
+
*/
|
|
44
|
+
|
|
45
|
+
/*
|
|
46
|
+
--vp-c-text-1: rgba(255, 255, 245, 0.86);
|
|
47
|
+
--vp-c-text-2: rgba(235, 235, 245, 0.6);
|
|
48
|
+
--vp-c-text-3: rgba(235, 235, 245, 0.38);
|
|
49
|
+
*/
|
|
50
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# {{ name }}
|
|
2
|
+
|
|
3
|
+
The Site is generated using [vuepress](https://vuepress.vuejs.org/) and [vuepress-theme-plume](https://github.com/pengzhanbo/vuepress-theme-plume)
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
{{#if (equal packageManager "pnpm")}}
|
|
9
|
+
pnpm i
|
|
10
|
+
{{else if (equal packageManager "yarn")}}
|
|
11
|
+
yarn
|
|
12
|
+
{{else}}
|
|
13
|
+
npm i
|
|
14
|
+
{{/if}}
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Usage
|
|
18
|
+
|
|
19
|
+
{{#if (equal packageManager "pnpm")}}
|
|
20
|
+
```sh
|
|
21
|
+
# start dev server
|
|
22
|
+
pnpm docs:dev
|
|
23
|
+
# build for production
|
|
24
|
+
pnpm docs:build
|
|
25
|
+
# preview production build in local
|
|
26
|
+
pnpm docs:preview
|
|
27
|
+
# update vuepress and theme
|
|
28
|
+
pnpm vp-update
|
|
29
|
+
```
|
|
30
|
+
{{else if (equal packageManager "yarn")}}
|
|
31
|
+
```sh
|
|
32
|
+
# start dev server
|
|
33
|
+
yarn docs:dev
|
|
34
|
+
# build for production
|
|
35
|
+
yarn docs:build
|
|
36
|
+
# preview production build in local
|
|
37
|
+
yarn docs:preview
|
|
38
|
+
# update vuepress and theme
|
|
39
|
+
yarn vp-update
|
|
40
|
+
```
|
|
41
|
+
{{else}}
|
|
42
|
+
```sh
|
|
43
|
+
# start dev server
|
|
44
|
+
npm run docs:dev
|
|
45
|
+
# build for production
|
|
46
|
+
npm run docs:build
|
|
47
|
+
# preview production build in local
|
|
48
|
+
npm run docs:preview
|
|
49
|
+
# update vuepress and theme
|
|
50
|
+
npm run vp-update
|
|
51
|
+
```
|
|
52
|
+
{{/if}}
|
|
53
|
+
|
|
54
|
+
## Documents
|
|
55
|
+
|
|
56
|
+
- [vuepress](https://vuepress.vuejs.org/)
|
|
57
|
+
- [vuepress-theme-plume](https://theme-plume.vuejs.press/)
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# {{ name }}
|
|
2
|
+
|
|
3
|
+
网站使用 [vuepress](https://vuepress.vuejs.org/) 和 [vuepress-theme-plume](https://github.com/pengzhanbo/vuepress-theme-plume) 构建生成。
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
{{#if (equal packageManager "pnpm")}}
|
|
9
|
+
pnpm i
|
|
10
|
+
{{else if (equal packageManager "yarn")}}
|
|
11
|
+
yarn
|
|
12
|
+
{{else}}
|
|
13
|
+
npm i
|
|
14
|
+
{{/if}}
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Usage
|
|
18
|
+
|
|
19
|
+
{{#if (equal packageManager "pnpm")}}
|
|
20
|
+
```sh
|
|
21
|
+
# 启动开发服务
|
|
22
|
+
pnpm docs:dev
|
|
23
|
+
# 构建生产包
|
|
24
|
+
pnpm docs:build
|
|
25
|
+
# 本地预览生产服务
|
|
26
|
+
pnpm docs:preview
|
|
27
|
+
# 更新 vuepress 和主题
|
|
28
|
+
pnpm vp-update
|
|
29
|
+
```
|
|
30
|
+
{{else if (equal packageManager "yarn")}}
|
|
31
|
+
```sh
|
|
32
|
+
# 启动开发服务
|
|
33
|
+
yarn docs:dev
|
|
34
|
+
# 构建生产包
|
|
35
|
+
yarn docs:build
|
|
36
|
+
# 本地预览生产服务
|
|
37
|
+
yarn docs:preview
|
|
38
|
+
# update vuepress and theme
|
|
39
|
+
yarn vp-update
|
|
40
|
+
```
|
|
41
|
+
{{else}}
|
|
42
|
+
```sh
|
|
43
|
+
# 启动开发服务
|
|
44
|
+
npm run docs:dev
|
|
45
|
+
# 构建生产包
|
|
46
|
+
npm run docs:build
|
|
47
|
+
# 本地预览生产服务
|
|
48
|
+
npm run docs:preview
|
|
49
|
+
# 更新 vuepress 和主题
|
|
50
|
+
npm run vp-update
|
|
51
|
+
```
|
|
52
|
+
{{/if}}
|
|
53
|
+
|
|
54
|
+
## 文档
|
|
55
|
+
|
|
56
|
+
- [vuepress](https://vuepress.vuejs.org/)
|
|
57
|
+
- [vuepress-theme-plume](https://theme-plume.vuejs.press/)
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
name: deploy
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
# 每当 push 到 main 分支时触发部署
|
|
5
|
+
# Deployment is triggered whenever a push is made to the main branch.
|
|
6
|
+
push:
|
|
7
|
+
branches: [main]
|
|
8
|
+
# 手动触发部署
|
|
9
|
+
# Manually trigger deployment
|
|
10
|
+
workflow_dispatch:
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
docs:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v4
|
|
18
|
+
with:
|
|
19
|
+
# “最近更新时间” 等 git 日志相关信息,需要拉取全部提交记录
|
|
20
|
+
# "Last updated time" and other git log-related information require fetching all commit records.
|
|
21
|
+
fetch-depth: 0
|
|
22
|
+
|
|
23
|
+
{{#if (equal packageManager "pnpm")}}
|
|
24
|
+
- name: Setup pnpm
|
|
25
|
+
uses: pnpm/action-setup@v4
|
|
26
|
+
with:
|
|
27
|
+
# 选择要使用的 pnpm 版本
|
|
28
|
+
version: 9
|
|
29
|
+
# 使用 pnpm 安装依赖
|
|
30
|
+
run_install: true
|
|
31
|
+
{{/if}}
|
|
32
|
+
- name: Setup Node.js
|
|
33
|
+
uses: actions/setup-node@v4
|
|
34
|
+
with:
|
|
35
|
+
# 选择要使用的 node 版本
|
|
36
|
+
node-version: 20
|
|
37
|
+
|
|
38
|
+
{{#if (equal packageManager "yarn")}}
|
|
39
|
+
- name: Run install
|
|
40
|
+
uses: borales/actions-yarn@v4
|
|
41
|
+
with:
|
|
42
|
+
cmd: install
|
|
43
|
+
{{/if}}
|
|
44
|
+
|
|
45
|
+
# 运行构建脚本
|
|
46
|
+
# Run the build script
|
|
47
|
+
{{#unless (equal packageManager "yarn")}}
|
|
48
|
+
- name: Build VuePress site
|
|
49
|
+
run: {{packageManager}} run docs:build
|
|
50
|
+
{{/unless}}
|
|
51
|
+
{{#if (equal packageManager "yarn")}}
|
|
52
|
+
- name: Build VuePress site
|
|
53
|
+
uses: borales/actions-yarn@v4
|
|
54
|
+
with:
|
|
55
|
+
cmd: docs:build
|
|
56
|
+
{{/if}}
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
# 查看 workflow 的文档来获取更多信息
|
|
60
|
+
# @see https://github.com/crazy-max/ghaction-github-pages
|
|
61
|
+
- name: Deploy to GitHub Pages
|
|
62
|
+
uses: crazy-max/ghaction-github-pages@v4
|
|
63
|
+
with:
|
|
64
|
+
# 部署到 gh-pages 分支
|
|
65
|
+
target_branch: gh-pages
|
|
66
|
+
# 部署目录为 VuePress 的默认输出目录
|
|
67
|
+
build_dir: {{docsDir}}/.vuepress/dist
|
|
68
|
+
env:
|
|
69
|
+
# @see https://docs.github.com/cn/actions/reference/authentication-in-a-workflow#about-the-github_token-secret
|
|
70
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# prevent Netlify npm install
|
|
2
|
+
|
|
3
|
+
[build]
|
|
4
|
+
publish = "{{ docsDir }}/.vuepress/dist"
|
|
5
|
+
command = "{{#if (equal packageManager 'yarn')}}yarn && yarn{{else}}{{packageManager}} run{{/if}} docs:build"
|
|
6
|
+
|
|
7
|
+
[build.environment]
|
|
8
|
+
NODE_VERSION = "20"
|
|
9
|
+
NPM_FLAGS = "--version"
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"framework": null,
|
|
3
|
+
"buildCommand": "{{#if (equal packageManager 'yarn')}}yarn{{else}}{{packageManager}} run{{/if}} docs:build",
|
|
4
|
+
"installCommand": "{{#if (equal packageManager 'yarn')}}yarn{{else}}{{packageManager}} install{{/if}}",
|
|
5
|
+
"outputDirectory": "{{ docsDir }}/.vuepress/dist"
|
|
6
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
pageLayout: home
|
|
3
|
+
externalLinkIcon: false
|
|
4
|
+
config:
|
|
5
|
+
-
|
|
6
|
+
type: hero
|
|
7
|
+
full: true
|
|
8
|
+
background: tint-plate
|
|
9
|
+
hero:
|
|
10
|
+
name: Theme Plume
|
|
11
|
+
tagline: VuePress Next Theme
|
|
12
|
+
text: A simple, feature-rich, document & blog
|
|
13
|
+
actions:
|
|
14
|
+
-
|
|
15
|
+
theme: brand
|
|
16
|
+
text: Blog
|
|
17
|
+
link: {{#if (equal defaultLanguage 'en-US')}}/{{else}}/en/{{/if}}blog/
|
|
18
|
+
-
|
|
19
|
+
theme: alt
|
|
20
|
+
text: Github →
|
|
21
|
+
link: https://github.com/pengzhanbo/vuepress-theme-plume
|
|
22
|
+
---
|