create-valaxy 0.0.5
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 +27 -0
- package/index.js +200 -0
- package/package.json +30 -0
- package/template/.github/workflows/gh-pages.yml +38 -0
- package/template/.vscode/extensions.json +10 -0
- package/template/.vscode/settings.json +16 -0
- package/template/README.md +45 -0
- package/template/_gitignore +13 -0
- package/template/_npmrc +2 -0
- package/template/components/README.md +7 -0
- package/template/layouts/README.md +3 -0
- package/template/locales/README.md +3 -0
- package/template/locales/en.yml +0 -0
- package/template/locales/zh-CN.yml +0 -0
- package/template/netlify.toml +16 -0
- package/template/package.json +12 -0
- package/template/pages/about/index.md +13 -0
- package/template/pages/about/site.md +7 -0
- package/template/pages/archives/index.md +5 -0
- package/template/pages/categories/index.md +9 -0
- package/template/pages/links/index.md +9 -0
- package/template/pages/posts/hello-valaxy.md +20 -0
- package/template/pages/tags/index.md +7 -0
- package/template/styles/README.md +8 -0
- package/template/styles/index.scss +1 -0
- package/template/styles/vars.scss +1 -0
- package/template/tsconfig.json +9 -0
- package/template/valaxy.config.ts +152 -0
- package/template/vercel.json +8 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2022 云游君 YunYouJun <me@yunyoujun.cn>
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# create-valaxy
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/create-valaxy)
|
|
4
|
+
|
|
5
|
+
Starter template generator for [valaxy](https://github.com/YunYouJun/valaxy).
|
|
6
|
+
|
|
7
|
+
## Usage
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm init valaxy
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
or
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
yarn create valaxy
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
or
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
pnpm create valaxy
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## FAQ
|
|
26
|
+
|
|
27
|
+
Use `chalk@4` `execa@5` for cjs.
|
package/index.js
ADDED
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/* eslint-disable no-console */
|
|
3
|
+
/* eslint-disable @typescript-eslint/no-var-requires */
|
|
4
|
+
|
|
5
|
+
// @ts-check
|
|
6
|
+
const fs = require('fs')
|
|
7
|
+
const path = require('path')
|
|
8
|
+
const argv = require('minimist')(process.argv.slice(2))
|
|
9
|
+
const prompts = require('prompts')
|
|
10
|
+
const execa = require('execa')
|
|
11
|
+
const chalk = require('chalk')
|
|
12
|
+
const { version } = require('./package.json')
|
|
13
|
+
|
|
14
|
+
const cwd = process.cwd()
|
|
15
|
+
|
|
16
|
+
const renameFiles = {
|
|
17
|
+
_gitignore: '.gitignore',
|
|
18
|
+
_npmrc: '.npmrc',
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
async function init() {
|
|
22
|
+
console.log()
|
|
23
|
+
console.log(` ${chalk.bold('🌌 Valaxy')} ${chalk.blue(`v${version}`)}`)
|
|
24
|
+
console.log()
|
|
25
|
+
|
|
26
|
+
let targetDir = argv._[0]
|
|
27
|
+
if (!targetDir) {
|
|
28
|
+
/**
|
|
29
|
+
* @type {{ projectName: string }}
|
|
30
|
+
*/
|
|
31
|
+
const { projectName } = await prompts({
|
|
32
|
+
type: 'text',
|
|
33
|
+
name: 'projectName',
|
|
34
|
+
message: 'Project name:',
|
|
35
|
+
initial: 'valaxy-blog',
|
|
36
|
+
})
|
|
37
|
+
targetDir = projectName.trim()
|
|
38
|
+
|
|
39
|
+
const packageName = await getValidPackageName(targetDir)
|
|
40
|
+
const root = path.join(cwd, targetDir)
|
|
41
|
+
|
|
42
|
+
if (fs.existsSync(root)) { fs.mkdirSync(root, { recursive: true }) }
|
|
43
|
+
else {
|
|
44
|
+
const existing = fs.readdirSync(root)
|
|
45
|
+
if (existing.length) {
|
|
46
|
+
console.log(chalk.yellow(` Target directory "${targetDir}" is not empty.`))
|
|
47
|
+
/**
|
|
48
|
+
* @type {{ yes: boolean }}
|
|
49
|
+
*/
|
|
50
|
+
const { yes } = await prompts({
|
|
51
|
+
type: 'confirm',
|
|
52
|
+
name: 'yes',
|
|
53
|
+
initial: 'Y',
|
|
54
|
+
message: 'Remove existing files and continue?',
|
|
55
|
+
})
|
|
56
|
+
if (yes)
|
|
57
|
+
emptyDir(root)
|
|
58
|
+
|
|
59
|
+
else
|
|
60
|
+
return
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
console.log(chalk.dim(' Scaffolding project in ') + targetDir + chalk.dim(' ...'))
|
|
65
|
+
|
|
66
|
+
const templateDir = path.join(__dirname, 'template')
|
|
67
|
+
const write = (file, content) => {
|
|
68
|
+
const targetPath = renameFiles[file]
|
|
69
|
+
? path.join(root, renameFiles[file])
|
|
70
|
+
: path.join(root, file)
|
|
71
|
+
if (content)
|
|
72
|
+
fs.writeFileSync(targetPath, content)
|
|
73
|
+
|
|
74
|
+
else
|
|
75
|
+
copy(path.join(templateDir, file), targetPath)
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
const files = fs.readdirSync(templateDir)
|
|
79
|
+
for (const file of files.filter(f => f !== 'package.json'))
|
|
80
|
+
write(file)
|
|
81
|
+
|
|
82
|
+
// write pkg name & version
|
|
83
|
+
const pkg = require(path.join(templateDir, 'package.json'))
|
|
84
|
+
pkg.name = packageName
|
|
85
|
+
pkg.version = version
|
|
86
|
+
|
|
87
|
+
write('package.json', JSON.stringify(pkg, null, 2))
|
|
88
|
+
|
|
89
|
+
const pkgManager = (/pnpm/.test(process.env.npm_execpath) || /pnpm/.test(process.env.npm_config_user_agent))
|
|
90
|
+
? 'pnpm'
|
|
91
|
+
: /yarn/.test(process.env.npm_execpath) ? 'yarn' : 'npm'
|
|
92
|
+
|
|
93
|
+
const related = path.relative(cwd, root)
|
|
94
|
+
console.log(chalk.green(' Done.\n'))
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* @type {{ yes: boolean }}
|
|
98
|
+
*/
|
|
99
|
+
const { yes } = await prompts({
|
|
100
|
+
type: 'confirm',
|
|
101
|
+
name: 'yes',
|
|
102
|
+
initial: 'Y',
|
|
103
|
+
message: 'Install and start it now?',
|
|
104
|
+
})
|
|
105
|
+
|
|
106
|
+
if (yes) {
|
|
107
|
+
const { agent } = await prompts({
|
|
108
|
+
name: 'agent',
|
|
109
|
+
type: 'select',
|
|
110
|
+
message: 'Choose the agent',
|
|
111
|
+
choices: ['npm', 'yarn', 'pnpm'].map(i => ({ value: i, title: i })),
|
|
112
|
+
})
|
|
113
|
+
|
|
114
|
+
if (!agent)
|
|
115
|
+
return
|
|
116
|
+
|
|
117
|
+
await execa(agent, ['install'], { stdio: 'inherit', cwd: root })
|
|
118
|
+
await execa(agent, ['run', 'dev'], { stdio: 'inherit', cwd: root })
|
|
119
|
+
}
|
|
120
|
+
else {
|
|
121
|
+
console.log(chalk.dim('\n start it later by:\n'))
|
|
122
|
+
if (root !== cwd)
|
|
123
|
+
console.log(chalk.blue(` cd ${chalk.bold(related)}`))
|
|
124
|
+
|
|
125
|
+
console.log(chalk.blue(` ${pkgManager === 'yarn' ? 'yarn' : `${pkgManager} install`}`))
|
|
126
|
+
console.log(chalk.blue(` ${pkgManager === 'yarn' ? 'yarn dev' : `${pkgManager} run dev`}`))
|
|
127
|
+
console.log()
|
|
128
|
+
console.log(` ${chalk.cyan('✨')}`)
|
|
129
|
+
console.log()
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
function copy(src, dest) {
|
|
135
|
+
const stat = fs.statSync(src)
|
|
136
|
+
if (stat.isDirectory())
|
|
137
|
+
copyDir(src, dest)
|
|
138
|
+
|
|
139
|
+
else
|
|
140
|
+
fs.copyFileSync(src, dest)
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
function copyDir(srcDir, destDir) {
|
|
144
|
+
fs.mkdirSync(destDir, { recursive: true })
|
|
145
|
+
for (const file of fs.readdirSync(srcDir)) {
|
|
146
|
+
const srcFile = path.resolve(srcDir, file)
|
|
147
|
+
const destFile = path.resolve(destDir, file)
|
|
148
|
+
copy(srcFile, destFile)
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
async function getValidPackageName(projectName) {
|
|
153
|
+
projectName = path.basename(projectName)
|
|
154
|
+
const packageNameRegExp = /^(?:@[a-z0-9-*~][a-z0-9-*._~]*\/)?[a-z0-9-~][a-z0-9-._~]*$/
|
|
155
|
+
if (packageNameRegExp.test(projectName)) {
|
|
156
|
+
return projectName
|
|
157
|
+
}
|
|
158
|
+
else {
|
|
159
|
+
const suggestedPackageName = projectName
|
|
160
|
+
.trim()
|
|
161
|
+
.toLowerCase()
|
|
162
|
+
.replace(/\s+/g, '-')
|
|
163
|
+
.replace(/^[._]/, '')
|
|
164
|
+
.replace(/[^a-z0-9-~]+/g, '-')
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* @type {{ inputPackageName: string }}
|
|
168
|
+
*/
|
|
169
|
+
const { inputPackageName } = await prompts({
|
|
170
|
+
type: 'text',
|
|
171
|
+
name: 'inputPackageName',
|
|
172
|
+
message: 'Package name:',
|
|
173
|
+
initial: suggestedPackageName,
|
|
174
|
+
validate: input =>
|
|
175
|
+
packageNameRegExp.test(input) ? true : 'Invalid package.json name',
|
|
176
|
+
})
|
|
177
|
+
return inputPackageName
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
function emptyDir(dir) {
|
|
182
|
+
if (!fs.existsSync(dir))
|
|
183
|
+
return
|
|
184
|
+
|
|
185
|
+
for (const file of fs.readdirSync(dir)) {
|
|
186
|
+
const abs = path.resolve(dir, file)
|
|
187
|
+
// baseline is Node 12 so can't use rmSync :(
|
|
188
|
+
if (fs.lstatSync(abs).isDirectory()) {
|
|
189
|
+
emptyDir(abs)
|
|
190
|
+
fs.rmdirSync(abs)
|
|
191
|
+
}
|
|
192
|
+
else {
|
|
193
|
+
fs.unlinkSync(abs)
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
init().catch((e) => {
|
|
199
|
+
console.error(e)
|
|
200
|
+
})
|
package/package.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "create-valaxy",
|
|
3
|
+
"version": "0.0.5",
|
|
4
|
+
"main": "index.js",
|
|
5
|
+
"description": "Create Starter Template for Valaxy",
|
|
6
|
+
"homepage": "https://valaxy.yyj.moe",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/YunYouJun/valaxy"
|
|
10
|
+
},
|
|
11
|
+
"author": {
|
|
12
|
+
"email": "me@yunyoujun.cn",
|
|
13
|
+
"name": "YunYouJun",
|
|
14
|
+
"url": "https://www.yunyoujun.cn"
|
|
15
|
+
},
|
|
16
|
+
"funding": "https://github.com/sponsors/YunYouJun",
|
|
17
|
+
"bin": {
|
|
18
|
+
"create-valaxy": "index.js"
|
|
19
|
+
},
|
|
20
|
+
"engines": {
|
|
21
|
+
"node": ">=14.0.0"
|
|
22
|
+
},
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"chalk": "4",
|
|
25
|
+
"execa": "5",
|
|
26
|
+
"minimist": "^1.2.6",
|
|
27
|
+
"prompts": "^2.4.2"
|
|
28
|
+
},
|
|
29
|
+
"readme": "# create-valaxy\n\n[](https://www.npmjs.com/package/create-valaxy)\n\nStarter template generator for [valaxy](https://github.com/YunYouJun/valaxy).\n\n## Usage\n\n```bash\nnpm init valaxy \n```\n\nor\n\n```bash\nyarn create valaxy\n```\n\nor\n\n```bash\npnpm create valaxy\n```\n\n## FAQ\n\nUse `chalk@4` `execa@5` for cjs.\n"
|
|
30
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
name: GitHub Pages
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
build:
|
|
10
|
+
runs-on: ${{ matrix.os }}
|
|
11
|
+
|
|
12
|
+
strategy:
|
|
13
|
+
matrix:
|
|
14
|
+
node-version: [16.x]
|
|
15
|
+
os: [ubuntu-latest]
|
|
16
|
+
fail-fast: false
|
|
17
|
+
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@v2
|
|
20
|
+
|
|
21
|
+
- name: Use Node.js ${{ matrix.node-version }}
|
|
22
|
+
uses: actions/setup-node@v2
|
|
23
|
+
with:
|
|
24
|
+
node-version: ${{ matrix.node-version }}
|
|
25
|
+
registry-url: https://registry.npmjs.org/
|
|
26
|
+
|
|
27
|
+
- name: 📦 Install Dependencies
|
|
28
|
+
run: npm i
|
|
29
|
+
|
|
30
|
+
- name: 🌌 Build Valaxy Blog
|
|
31
|
+
run: npm run build
|
|
32
|
+
|
|
33
|
+
- name: 🪤 Deploy to GitHub Pages
|
|
34
|
+
uses: peaceiris/actions-gh-pages@v3
|
|
35
|
+
with:
|
|
36
|
+
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
37
|
+
publish_dir: ./dist
|
|
38
|
+
force_orphan: true
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"cSpell.words": ["valaxy", "valaxyjs"],
|
|
3
|
+
"i18n-ally.sourceLanguage": "en",
|
|
4
|
+
"i18n-ally.keystyle": "nested",
|
|
5
|
+
"i18n-ally.localesPaths": "locales",
|
|
6
|
+
"i18n-ally.sortKeys": true,
|
|
7
|
+
"prettier.enable": true,
|
|
8
|
+
"editor.codeActionsOnSave": {
|
|
9
|
+
"source.fixAll.eslint": true
|
|
10
|
+
},
|
|
11
|
+
"files.associations": {
|
|
12
|
+
"*.css": "postcss"
|
|
13
|
+
},
|
|
14
|
+
"editor.formatOnSave": false,
|
|
15
|
+
"svg.preview.background": "editor"
|
|
16
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# create-valaxy
|
|
2
|
+
|
|
3
|
+
Example: [valaxy.yyj.moe](https://valaxy.yyj.moe)
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
# install
|
|
9
|
+
npm i
|
|
10
|
+
# or pnpm i
|
|
11
|
+
|
|
12
|
+
# start
|
|
13
|
+
npm run dev
|
|
14
|
+
# or pnpm dev
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
See `http://localhost:4859/`, have fun!
|
|
18
|
+
|
|
19
|
+
### Config
|
|
20
|
+
|
|
21
|
+
Modify `valaxy.config.ts` to custom your blog.
|
|
22
|
+
|
|
23
|
+
English & Chinese Docs is coming!
|
|
24
|
+
|
|
25
|
+
> Wait a minute.
|
|
26
|
+
|
|
27
|
+
## Structure
|
|
28
|
+
|
|
29
|
+
In most cases, you only need to work in the `pages` folder.
|
|
30
|
+
|
|
31
|
+
### Main folders
|
|
32
|
+
|
|
33
|
+
- `pages`: your all pages
|
|
34
|
+
- `posts`: write your posts here, will be counted as posts
|
|
35
|
+
- `styles`: override theme styles, `index.scss`/`vars.csss`/`index.css` will be loaded automatically
|
|
36
|
+
- `components`: custom your vue components (will be loaded automatically)
|
|
37
|
+
- `layouts`: custom layouts (use it by `layout: xxx` in md)
|
|
38
|
+
- `locales`: custom i18n
|
|
39
|
+
|
|
40
|
+
### Other
|
|
41
|
+
|
|
42
|
+
- `.vscode`: recommend some useful plugins & settings, you can preview icon/i18n/class...
|
|
43
|
+
- `.github`: GitHub Actions to auto build & deploy to GitHub Pages
|
|
44
|
+
- `netlify.toml`: for [netlify](https://www.netlify.com/)
|
|
45
|
+
- `vercel.json`: for [vercel](https://vercel.com/)
|
package/template/_npmrc
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# Components
|
|
2
|
+
|
|
3
|
+
Components in this dir will be auto-registered and on-demand, powered by [`unplugin-vue-components`](https://github.com/antfu/unplugin-vue-components).
|
|
4
|
+
|
|
5
|
+
## Icons
|
|
6
|
+
|
|
7
|
+
You can use icons from almost any icon sets by the power of [Iconify](https://iconify.design/).
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
[build.environment]
|
|
2
|
+
NODE_VERSION = "16"
|
|
3
|
+
|
|
4
|
+
[build]
|
|
5
|
+
publish = "dist"
|
|
6
|
+
command = "npm run build"
|
|
7
|
+
|
|
8
|
+
[[redirects]]
|
|
9
|
+
from = "/*"
|
|
10
|
+
to = "/index.html"
|
|
11
|
+
status = 200
|
|
12
|
+
|
|
13
|
+
[[headers]]
|
|
14
|
+
for = "/manifest.webmanifest"
|
|
15
|
+
[headers.values]
|
|
16
|
+
Content-Type = "application/manifest+json"
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 关于我
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
I am developing [Valaxy](https://github.com/YunYouJun/valaxy) - Next Generation Static Blog Framework.
|
|
6
|
+
|
|
7
|
+
If you like it, you can sponsor me in [GitHub](https://github.com/sponsors/YunYouJun) or [sponsors.yunyoujun.cn](https://sponsors.yunyoujun.cn).
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
我正在开发 [Valaxy](https://github.com/YunYouJun/valaxy) - 下一代静态博客框架。
|
|
12
|
+
|
|
13
|
+
如果你喜欢它,你可以在 [GitHub](https://github.com/sponsors/YunYouJun) 或 [sponsors.yunyoujun.cn](https://sponsors.yunyoujun.cn) 赞助我。
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Hello, Valaxy!
|
|
3
|
+
date: 2022-04-01
|
|
4
|
+
updated: 2022-04-01
|
|
5
|
+
categories: Valaxy 笔记
|
|
6
|
+
tags:
|
|
7
|
+
- valaxy
|
|
8
|
+
- 笔记
|
|
9
|
+
top: 1
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Valaxy
|
|
13
|
+
|
|
14
|
+
Next Generation Static Blog Framework.
|
|
15
|
+
|
|
16
|
+
Write your first post!
|
|
17
|
+
|
|
18
|
+
## Usage
|
|
19
|
+
|
|
20
|
+
Modify `valaxy.config.ts` to custom your blog.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
// you can custom css here
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
// you can custom css vars here
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import type { UserConfig } from 'valaxy'
|
|
2
|
+
import type { ThemeUserConfig } from 'valaxy-theme-yun'
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* User Config
|
|
6
|
+
* do not use export const
|
|
7
|
+
*/
|
|
8
|
+
const config: UserConfig<ThemeUserConfig> = {
|
|
9
|
+
lang: 'zh-CN',
|
|
10
|
+
title: 'Valaxy Theme Yun',
|
|
11
|
+
author: {
|
|
12
|
+
name: '云游君',
|
|
13
|
+
},
|
|
14
|
+
description: 'Valaxy Theme Yun Preview.',
|
|
15
|
+
social: [
|
|
16
|
+
{
|
|
17
|
+
name: 'RSS',
|
|
18
|
+
link: '/atom.xml',
|
|
19
|
+
icon: 'i-ri-rss-line',
|
|
20
|
+
color: 'orange',
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
name: 'QQ 群 1050458482',
|
|
24
|
+
link: 'https://qm.qq.com/cgi-bin/qm/qr?k=kZJzggTTCf4SpvEQ8lXWoi5ZjhAx0ILZ&jump_from=webapi',
|
|
25
|
+
icon: 'i-ri-qq-line',
|
|
26
|
+
color: '#12B7F5',
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
name: 'GitHub',
|
|
30
|
+
link: 'https://github.com/YunYouJun',
|
|
31
|
+
icon: 'i-ri-github-line',
|
|
32
|
+
color: '#6e5494',
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
name: '微博',
|
|
36
|
+
link: 'https://weibo.com/jizhideyunyoujun',
|
|
37
|
+
icon: 'i-ri-weibo-line',
|
|
38
|
+
color: '#E6162D',
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
name: '豆瓣',
|
|
42
|
+
link: 'https://www.douban.com/people/yunyoujun/',
|
|
43
|
+
icon: 'i-ri-douban-line',
|
|
44
|
+
color: '#007722',
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
name: '网易云音乐',
|
|
48
|
+
link: 'https://music.163.com/#/user/home?id=247102977',
|
|
49
|
+
icon: 'i-ri-netease-cloud-music-line',
|
|
50
|
+
color: '#C20C0C',
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
name: '知乎',
|
|
54
|
+
link: 'https://www.zhihu.com/people/yunyoujun/',
|
|
55
|
+
icon: 'i-ri-zhihu-line',
|
|
56
|
+
color: '#0084FF',
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
name: '哔哩哔哩',
|
|
60
|
+
link: 'https://space.bilibili.com/1579790',
|
|
61
|
+
icon: 'i-ri-bilibili-line',
|
|
62
|
+
color: '#FF8EB3',
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
name: '微信公众号',
|
|
66
|
+
link: 'https://cdn.jsdelivr.net/gh/YunYouJun/cdn/img/about/white-qrcode-and-search.jpg',
|
|
67
|
+
icon: 'i-ri-wechat-2-line',
|
|
68
|
+
color: '#1AAD19',
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
name: 'Twitter',
|
|
72
|
+
link: 'https://twitter.com/YunYouJun',
|
|
73
|
+
icon: 'i-ri-twitter-line',
|
|
74
|
+
color: '#1da1f2',
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
name: 'Telegram Channel',
|
|
78
|
+
link: 'https://t.me/elpsycn',
|
|
79
|
+
icon: 'i-ri-telegram-line',
|
|
80
|
+
color: '#0088CC',
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
name: 'E-Mail',
|
|
84
|
+
link: 'mailto:me@yunyoujun.cn',
|
|
85
|
+
icon: 'i-ri-mail-line',
|
|
86
|
+
color: '#8E71C1',
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
name: 'Travelling',
|
|
90
|
+
link: 'https://travellings.link',
|
|
91
|
+
icon: 'i-ri-train-line',
|
|
92
|
+
color: 'var(--yun-c-text)',
|
|
93
|
+
},
|
|
94
|
+
],
|
|
95
|
+
|
|
96
|
+
search: {
|
|
97
|
+
algolia: {
|
|
98
|
+
enable: true,
|
|
99
|
+
appId: 'CJXXAGRCYN',
|
|
100
|
+
apiKey: 'ae1966d2aeab22bf9335679f45d2cd9a',
|
|
101
|
+
indexName: 'my-hexo-blog',
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
|
|
105
|
+
theme: 'yun',
|
|
106
|
+
|
|
107
|
+
themeConfig: {
|
|
108
|
+
banner: {
|
|
109
|
+
enable: true,
|
|
110
|
+
title: '云游君的小站',
|
|
111
|
+
},
|
|
112
|
+
|
|
113
|
+
pages: [
|
|
114
|
+
{
|
|
115
|
+
name: '我的小伙伴们',
|
|
116
|
+
url: '/links/',
|
|
117
|
+
icon: 'i-ri-genderless-line',
|
|
118
|
+
color: 'dodgerblue',
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
name: '喜欢的女孩子',
|
|
122
|
+
url: '/girls/',
|
|
123
|
+
icon: 'i-ri-women-line',
|
|
124
|
+
color: 'hotpink',
|
|
125
|
+
},
|
|
126
|
+
],
|
|
127
|
+
|
|
128
|
+
footer: {
|
|
129
|
+
since: 2016,
|
|
130
|
+
beian: {
|
|
131
|
+
enable: true,
|
|
132
|
+
icp: '苏ICP备17038157号',
|
|
133
|
+
},
|
|
134
|
+
},
|
|
135
|
+
},
|
|
136
|
+
|
|
137
|
+
unocss: {
|
|
138
|
+
safelist: [
|
|
139
|
+
'i-ri-home-line',
|
|
140
|
+
],
|
|
141
|
+
},
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* add your icon to safelist
|
|
146
|
+
* if your theme is not yun, so you can add it by yourself
|
|
147
|
+
*/
|
|
148
|
+
config.themeConfig?.pages?.forEach((item) => {
|
|
149
|
+
config.unocss?.safelist?.push(item?.icon)
|
|
150
|
+
})
|
|
151
|
+
|
|
152
|
+
export default config
|