create-valaxy 1.1.0 → 1.2.1
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/dist/index.mjs +4 -4
- package/package.json +14 -2
- package/template-blog/AGENTS.md +39 -0
- package/template-blog/README.md +39 -13
- package/template-blog/package.json +3 -3
- package/template-blog/pages/about/index.md +2 -10
- package/template-blog/pages/about/site.md +2 -2
- package/template-blog/pages/links/index.md +10 -4
- package/template-blog/pages/posts/hello-valaxy.md +3 -1
- package/template-blog/pnpm-workspace.yaml +9 -0
- package/template-blog/public/.npmignore +7 -0
- package/template-blog/site.config.ts +27 -92
- package/template-blog/valaxy.config.ts +16 -13
- package/template-blog-press/public/.npmignore +5 -0
- package/template-blog-press/site.config.ts +13 -0
- package/template-blog-press/valaxy.config.ts +5 -0
- package/template-blog/_npmrc +0 -3
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import x from"node:process";import r from"node:fs";import
|
|
2
|
-
${t.red("Removing")} ${t.dim(e)}`),!!r.existsSync(e))for(const n of r.readdirSync(e))n!==".git"&&r.rmSync(
|
|
3
|
-
`),
|
|
4
|
-
`)),
|
|
1
|
+
import x from"node:process";import r from"node:fs";import i from"node:path";import{fileURLToPath as U}from"node:url";import{colors as t}from"consola/utils";import{execa as E}from"execa";import J from"minimist";import v from"prompts";const Y="1.2.1",N={name:"starter",repo:"https://github.com/valaxyjs/valaxy-theme-starter"};async function G(e){const n=N.name;let o=e.themeName||n;const d=`valaxy-theme-${o.trim()}`;return console.log(` ${t.dim("npx")} ${t.gray("degit")} ${t.blue(N.repo)} ${t.yellow(d)}`),await E("npx",["degit",N.repo,d],{stdio:"inherit"}),console.log(),console.log(` ${t.bold("Check it")}:`),console.log(),console.log(`- Change ${t.bold("author")} name in ${t.yellow("LICENSE")} & ${t.green("package.json")} & ${t.blue(".github")}`),console.log(`- Change ${t.blue("valaxy.config.ts")} theme: ${t.yellow("starter")} to ${t.cyan(`${o}`)}`),console.log(`- Rename ${t.yellow(`valaxy-theme-${o}`)} to ${t.cyan(`valaxy-theme-${o}`)}`),console.log(),console.log(` ${t.cyan("\u2728")}`),console.log(),`valaxy-theme-${o}`}const W={_gitignore:".gitignore"},Z=[{name:"yun",display:"Yun",desc:"A light & clean theme (default)",color:t.cyan},{name:"press",display:"Press",desc:"A document-oriented theme",color:t.green},{name:"custom",display:"Custom",desc:"Enter a custom theme name",color:t.yellow}],w=[{name:"blog",display:"Blog",desc:"For Most Users",message:"Project name:",initial:"valaxy-blog",color:t.cyan},{name:"theme",display:"Theme",desc:"For Theme Developers",message:"Theme name: valaxy-theme-",initial:"starter",prefix:"valaxy-theme-",color:t.green,customInit:async e=>G(e).catch(n=>{console.error(n)})},{name:"addon",display:"Addon",desc:"For Addon Developers",message:"Addon name: valaxy-addon-",initial:"template",prefix:"valaxy-addon-",color:t.yellow}],F=w.map(e=>e.name),z="valaxy-theme-",q=/^[a-z\d\-_]+$/,K=U(import.meta.url);function L(e){if(!q.test(e))throw new Error(`Invalid theme name: "${e}"`);return i.resolve(K,"../..",`template-blog-${e}`)}function Q(e){try{return r.existsSync(L(e))}catch{return!1}}function X(e){const n=e.trim();return n.startsWith(z)?n.slice(z.length):n}function ee(e,n){const o={...e,dependencies:{...e.dependencies}};return n==="yun"||(o.dependencies?.["valaxy-theme-yun"]&&delete o.dependencies["valaxy-theme-yun"],o.dependencies[`valaxy-theme-${n}`]=n==="press"&&o.dependencies.valaxy||"latest"),o}function te(e,n){if(n==="yun")return e;let o=e;return o=o.replace("import type { UserThemeConfig } from 'valaxy-theme-yun'",`// import type { UserThemeConfig } from 'valaxy-theme-${n}'`),o=o.replace("theme: 'yun'",`theme: '${n}'`),o=o.replace("defineValaxyConfig<UserThemeConfig>","defineValaxyConfig"),o=o.replace(/themeConfig: \{[\s\S]*?\n {2}\},/,"themeConfig: {},"),o}function O(e){return e?.trim().replace(/\/+$/g,"")}function M(e){const n=r.readdirSync(e);return n.length===0||n.length===1&&n[0]===".git"}function _(e,n){i.basename(e)!==".npmignore"&&(r.statSync(e).isDirectory()?ne(e,n):r.copyFileSync(e,n))}function ne(e,n){r.mkdirSync(n,{recursive:!0});for(const o of r.readdirSync(e)){const d=i.resolve(e,o),g=i.resolve(n,o);_(d,g)}}function oe(e){if(console.log(`
|
|
2
|
+
${t.red("Removing")} ${t.dim(e)}`),!!r.existsSync(e))for(const n of r.readdirSync(e))n!==".git"&&r.rmSync(i.resolve(e,n),{recursive:!0,force:!0})}function R(e){return/^(?:@[a-z\d\-*~][a-z\d\-*._~]*\/)?[a-z\d\-~][a-z\d\-._~]*$/.test(e)}function P(e){return e.trim().toLowerCase().replace(/\s+/g,"-").replace(/^[._]/,"").replace(/[^a-z\d\-~]+/g,"-")}function ae(e){if(!e)return;const n=e.split(" ")[0].split("/");return{name:n[0],version:n[1]}}const u=J(x.argv.slice(2)),D=x.cwd(),re="valaxy-blog",ie=U(import.meta.url);async function le(){console.log(),console.log(` ${t.bold("\u{1F30C} Valaxy")} ${t.blue(`v${Y}`)}`),console.log();const e=O(u._[0]),n=u.template||u.t,o=u.y||u.yes,d=u.port||u.p;let g=e||re;const S=()=>g==="."?i.basename(i.resolve()):g;let b;const C=w.find(c=>c.name===n);if(o&&n&&!C)throw new Error(`Unknown template: ${n}. Choose ${F.join(", ")}.`);let l=C||w[0],f="yun";if(o)b={projectName:g,overwrite:!1,packageName:P(S())};else{const c=await v({type:n&&F.includes(n)?null:"select",name:"template",message:typeof n=="string"&&!F.includes(n)?t.reset(`"${n}" isn't a valid template. Please choose from below: `):t.reset("Select a type:"),initial:0,choices:w.map(a=>{const p=a.color;return{title:p(a.display||a.name)+t.dim(` - ${a.desc}`),value:a}})});if(!C&&!c.template)return;if(l=c.template||l,l.name==="blog"){const a=await v({type:"select",name:"theme",message:t.reset("Select a theme:"),initial:0,choices:Z.map(p=>{const h=p.color;return{title:h(p.display)+t.dim(` - ${p.desc}`),value:p.name}})});if(a.theme==="custom"){const p=await v({type:"text",name:"themeName",message:t.reset('Theme name (e.g. "starter" or "valaxy-theme-starter"):'),initial:"yun"});f=X(p.themeName||"yun")}else f=a.theme||"yun"}try{b=await v([{type:e?null:"text",name:"projectName",message:t.reset(l.message),initial:l.initial,onState:a=>{g=O(l.prefix?l.prefix+a.value:a.value)||l.initial}},{type:()=>!r.existsSync(g)||M(g)?null:"confirm",name:"overwrite",message:()=>`${g==="."?"Current directory":`Target directory "${g}"`} is not empty. Remove existing files and continue?`},{type:(a,{overwrite:p})=>{if(p===!1)throw new Error(`${t.red("\u2716")} Operation cancelled`);return null},name:"overwriteChecker"},{type:()=>R(S())?null:"text",name:"packageName",message:t.reset("Package name:"),initial:()=>P(S()),validate:a=>R(a)||"Invalid package.json name"}],{onCancel:()=>{throw new Error(`${t.red("\u2716")} Operation cancelled`)}})}catch(a){console.log(a.message);return}}const{projectName:T=g,overwrite:V,packageName:H}=b,I=e||(l.prefix?l.prefix+T:T),s=i.resolve(D,I);if(o&&r.existsSync(s)&&!M(s))throw new Error(`Target directory "${I}" is not empty. Run without --yes to confirm overwriting.`);if(V?oe(s):r.existsSync(s)||r.mkdirSync(s,{recursive:!0}),l.customInit)await l.customInit({themeName:T});else{const c=i.resolve(ie,"../..",`template-${l.name}`),a=(m,y)=>{const $=i.join(s,W[m]??m);y?r.writeFileSync($,y):_(i.join(c,m),$)},p=r.readdirSync(c);for(const m of p.filter(y=>y!=="package.json"))a(m);const h=JSON.parse(r.readFileSync(i.join(c,"package.json"),"utf-8"));if(h.name=H||P(i.basename(s)),l.name==="blog"){const m=ee(h,f);Object.assign(h,m)}if(a("package.json",`${JSON.stringify(h,null,2)}
|
|
3
|
+
`),l.name==="blog")if(Q(f)){const m=L(f),y=r.readdirSync(m);for(const $ of y)_(i.join(m,$),i.join(s,$))}else{const m=i.join(s,"valaxy.config.ts");if(r.existsSync(m)){const y=r.readFileSync(m,"utf-8");r.writeFileSync(m,te(y,f))}}}console.log(` ${t.dim("\u{1F4C1}")} ${t.dim(s)}`),console.log(),console.log(t.dim(" Scaffolding project in ")+g+t.dim(" ..."));const A=ae(x.env.npm_config_user_agent),j=A?A.name:"npm",B=i.relative(D,s);if(console.log(t.green(` Done.
|
|
4
|
+
`)),l.name==="addon")return;let k;if(o?k=!1:{yes:k}=await v({type:"confirm",name:"yes",initial:"Y",message:"Install and start it now?"}),k){let c;if(o?c="pnpm":{agent:c}=await v({name:"agent",type:"select",message:"Choose the agent",choices:["npm","yarn","pnpm","bun"].map(a=>({value:a,title:a})),initial:2}),!c)return;await E(c,["install"],{stdio:"inherit",cwd:s}),await E(c,d?["run","dev","--port",d]:["run","dev"],{stdio:"inherit",cwd:s})}else{switch(console.log(t.dim(`
|
|
5
5
|
start it later by:
|
|
6
6
|
`)),s!==D&&console.log(` ${t.green("cd")} ${t.blue(B)}`),j){case"yarn":console.log(` ${t.green("yarn")}`),console.log(` ${t.green("yarn")} dev`);break;default:console.log(` ${t.green(j)} install`),console.log(` ${t.green(j)} run dev`);break}console.log(),console.log(` ${t.cyan("\u2728")}`)}}le().catch(e=>{console.error(e),x.exitCode=1});
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-valaxy",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.1
|
|
4
|
+
"version": "1.2.1",
|
|
5
5
|
"description": "Create Starter Template for Valaxy",
|
|
6
6
|
"author": {
|
|
7
7
|
"email": "me@yunyoujun.cn",
|
|
@@ -28,7 +28,19 @@
|
|
|
28
28
|
"files": [
|
|
29
29
|
"bin",
|
|
30
30
|
"dist",
|
|
31
|
-
"template-*/**/*"
|
|
31
|
+
"template-*/**/*",
|
|
32
|
+
"!template-*/*.log",
|
|
33
|
+
"!template-*/.env*",
|
|
34
|
+
"!template-*/.valaxy/**",
|
|
35
|
+
"!template-*/.vite-ssg-dist/**",
|
|
36
|
+
"!template-*/.vite-ssg-temp/**",
|
|
37
|
+
"!template-*/dist-ssr/**",
|
|
38
|
+
"!template-*/dist/**",
|
|
39
|
+
"!template-*/node_modules/**",
|
|
40
|
+
"!template-*/public/atom.xml",
|
|
41
|
+
"!template-*/public/feed.json",
|
|
42
|
+
"!template-*/public/feed.xml",
|
|
43
|
+
"!template-*/public/valaxy-fuse-list.json"
|
|
32
44
|
],
|
|
33
45
|
"engines": {
|
|
34
46
|
"node": ">=22.12.0"
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# AGENTS.md
|
|
2
|
+
|
|
3
|
+
Instructions for coding agents working in this Valaxy blog. This is a user site, not the Valaxy framework repository.
|
|
4
|
+
|
|
5
|
+
## Commands
|
|
6
|
+
|
|
7
|
+
Use Node.js `>=22.12.0` and pnpm `>=10.26.0`. Keep `pnpm-workspace.yaml`; it records dependency build permissions.
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
pnpm install
|
|
11
|
+
pnpm dev
|
|
12
|
+
pnpm build
|
|
13
|
+
pnpm serve
|
|
14
|
+
pnpm exec valaxy new your-post-slug
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
`pnpm dev` serves the site at the `Preview` address, usually `http://localhost:4859/`. `pnpm build` writes a static site to `dist/`. `pnpm serve` previews that output and does not rebuild it.
|
|
18
|
+
|
|
19
|
+
## Where to edit
|
|
20
|
+
|
|
21
|
+
- `pages/posts/` — Markdown posts. Frontmatter between `---` sets title, date, tags, and other metadata.
|
|
22
|
+
- `site.config.ts` — site title, author, description, and the production `url` (`defineSiteConfig`).
|
|
23
|
+
- `valaxy.config.ts` — theme and framework options (`defineValaxyConfig`). Yun's large home-page text is `themeConfig.banner.title`.
|
|
24
|
+
- `styles/`, `components/`, `layouts/`, and `locales/` — optional overrides. A file here replaces the theme file with the same name.
|
|
25
|
+
|
|
26
|
+
Replace `https://example.com/` in `site.config.ts` before publishing. The sitemap, RSS, and `llms.txt` use that address.
|
|
27
|
+
|
|
28
|
+
## AI-readable output
|
|
29
|
+
|
|
30
|
+
This project sets `llms.enable: true`. `pnpm build` writes `dist/llms.txt`, `dist/llms-full.txt`, and raw post Markdown under `dist/`. Those files publish post Markdown with the site. Turn that off with `llms.enable: false` in `site.config.ts`.
|
|
31
|
+
|
|
32
|
+
MCP is off. The commented example in `valaxy.config.ts` points at https://valaxy.site/guide/work-with-ai#mcp. Leave it commented unless you want the local read-only dev server.
|
|
33
|
+
|
|
34
|
+
## Conventions
|
|
35
|
+
|
|
36
|
+
- Install and add packages with pnpm.
|
|
37
|
+
- Use the `defineSiteConfig` and `defineValaxyConfig` helpers from `valaxy`.
|
|
38
|
+
- Check unfamiliar APIs against the installed package or https://valaxy.site/guide/getting-started.
|
|
39
|
+
- Keep edits inside this site. Do not change `node_modules` or assume framework defaults from an older scaffold.
|
package/template-blog/README.md
CHANGED
|
@@ -1,28 +1,53 @@
|
|
|
1
|
-
#
|
|
1
|
+
# My Valaxy blog
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Follow the [Getting Started guide](https://valaxy.site/guide/getting-started) ([中文](https://valaxy.site/zh/guide/getting-started)). Requires Node.js `>=22.12.0` and pnpm `>=10.26.0`. Keep `pnpm-workspace.yaml`, which includes dependency build script permissions for installation.
|
|
4
4
|
|
|
5
5
|
## Usage
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
pnpm install
|
|
9
|
+
pnpm dev
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Open the `Preview` address in the terminal (usually `http://localhost:4859/`). Leave the server running while editing; stop it with `Ctrl+C`.
|
|
13
|
+
|
|
14
|
+
### Write a post
|
|
15
|
+
|
|
16
|
+
Create `pages/posts/first-post.md`:
|
|
11
17
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
18
|
+
```md
|
|
19
|
+
---
|
|
20
|
+
title: My first post
|
|
21
|
+
date: 2026-10-05
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
Hello, Valaxy!
|
|
15
25
|
```
|
|
16
26
|
|
|
17
|
-
|
|
27
|
+
Use your publication date. Save the file, then open `/posts/first-post` or click its title on the home page. You can also generate a file with `pnpm exec valaxy new first-post` from a second terminal in this project.
|
|
18
28
|
|
|
19
29
|
### Config
|
|
20
30
|
|
|
21
|
-
|
|
31
|
+
Edit `site.config.ts` for `title`, `author.name`, `description`, `lang`, and your production `url`. The URL is used in post links, RSS, the sitemap, and `llms.txt`; replace `https://example.com/` before deployment.
|
|
32
|
+
|
|
33
|
+
Keep an explicit `timezone` (the Yun template uses `Asia/Shanghai`) so the build server and visitors display the same post times. For precise publication times, use an offset such as `2026-10-05T14:30:00+08:00`; `valaxy new` generates this format automatically.
|
|
34
|
+
|
|
35
|
+
The template sets `llms.enable: true`, so `pnpm build` writes `dist/llms.txt` and publishes post Markdown. Set `llms.enable: false` to turn that off. Social links, the sponsor block, and footer ICP registration are placeholders; sponsor and ICP start disabled.
|
|
36
|
+
|
|
37
|
+
Edit `valaxy.config.ts` for theme and framework options. Yun's large home page text uses `themeConfig.banner.title`. `AGENTS.md` gives coding agents the same project notes. MCP stays commented out.
|
|
38
|
+
|
|
39
|
+
### Build and preview
|
|
40
|
+
|
|
41
|
+
Stop the development server, then run:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
pnpm build
|
|
45
|
+
pnpm serve
|
|
46
|
+
```
|
|
22
47
|
|
|
23
|
-
|
|
48
|
+
The build prerenders pages into `dist/`. Open the preview address (usually `http://localhost:4173/`) and check the home page and `/posts/first-post`, including after a refresh. The corresponding files are `dist/index.html` and `dist/posts/first-post.html`.
|
|
24
49
|
|
|
25
|
-
|
|
50
|
+
Run `pnpm build` again after editing; `pnpm serve` only serves existing output. See the [deployment guide](https://valaxy.site/guide/deploy) to deploy `dist/`.
|
|
26
51
|
|
|
27
52
|
### Docker
|
|
28
53
|
|
|
@@ -38,13 +63,14 @@ In most cases, you only need to work in the `pages` folder.
|
|
|
38
63
|
|
|
39
64
|
- `pages`: your all pages
|
|
40
65
|
- `posts`: write your posts here, will be counted as posts
|
|
41
|
-
- `styles`: override theme styles, `index.
|
|
66
|
+
- `styles`: override theme styles, `index.ts`/`index.scss`/`index.css` will be loaded automatically
|
|
42
67
|
- `components`: custom your vue components (will be loaded automatically)
|
|
43
68
|
- `layouts`: custom layouts (use it by `layout: xxx` in md)
|
|
44
69
|
- `locales`: custom i18n
|
|
45
70
|
|
|
46
71
|
### Other
|
|
47
72
|
|
|
73
|
+
- `AGENTS.md`: notes for coding agents working in this site
|
|
48
74
|
- `.vscode`: recommend some useful plugins & settings, you can preview icon/i18n/class...
|
|
49
75
|
- `.github`: GitHub Actions to auto build & deploy to GitHub Pages
|
|
50
76
|
- `netlify.toml`: for [netlify](https://www.netlify.com/)
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"node": ">=22.12.0"
|
|
8
8
|
},
|
|
9
9
|
"scripts": {
|
|
10
|
-
"build": "
|
|
10
|
+
"build": "valaxy build --ssg",
|
|
11
11
|
"build:spa": "valaxy build",
|
|
12
12
|
"build:ssg": "valaxy build --ssg",
|
|
13
13
|
"dev": "valaxy",
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
"serve": "vite preview"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"valaxy": "1.1
|
|
19
|
-
"valaxy-theme-yun": "1.1
|
|
18
|
+
"valaxy": "1.2.1",
|
|
19
|
+
"valaxy-theme-yun": "1.2.1",
|
|
20
20
|
"vue": "^3.5.41",
|
|
21
21
|
"vue-router": "^5.0.0"
|
|
22
22
|
},
|
|
@@ -2,14 +2,6 @@
|
|
|
2
2
|
title: 关于我
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Replace this page with a short introduction.
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
我正在开发 [Valaxy](https://github.com/YunYouJun/valaxy) - 下一代静态博客框架。
|
|
12
|
-
|
|
13
|
-
如果你喜欢它,你可以在 [GitHub](https://github.com/sponsors/YunYouJun) 或 [www.yunyoujun.cn/sponsors/](https://www.yunyoujun.cn/sponsors/) 赞助我。
|
|
14
|
-
|
|
15
|
-
Check out the [Valaxy | GitHub](https://github.com/YunYouJun/valaxy) for more details.
|
|
7
|
+
把这一页换成你的自我介绍。
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
title: 关于站点
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
-
Valaxy
|
|
5
|
+
This site is built with [Valaxy](https://valaxy.site/) and valaxy-theme-yun.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Replace this page with notes about your site.
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
---
|
|
2
|
-
title:
|
|
2
|
+
title: 友情链接
|
|
3
3
|
keywords: 链接
|
|
4
|
-
description:
|
|
5
|
-
links:
|
|
6
|
-
|
|
4
|
+
description: 示例友情链接
|
|
5
|
+
links:
|
|
6
|
+
- url: https://example.com/
|
|
7
|
+
avatar: /favicon.svg
|
|
8
|
+
name: Example
|
|
9
|
+
blog: Example Blog
|
|
10
|
+
desc: Replace this card with a site you want to recommend.
|
|
11
|
+
color: "#0078e7"
|
|
12
|
+
random: false
|
|
7
13
|
---
|
|
8
14
|
|
|
9
15
|
<YunLinks :links="frontmatter.links" :random="frontmatter.random" />
|
|
@@ -24,4 +24,6 @@ Components in `components/` can be used directly in Markdown. This cover uses Vu
|
|
|
24
24
|
|
|
25
25
|
## Usage
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
Edit `site.config.ts` for your site title, author, description, and production URL. Edit `valaxy.config.ts` for theme and framework options.
|
|
28
|
+
|
|
29
|
+
Add Markdown posts to `pages/posts/`, then run `pnpm build` to generate your site in `dist/`. Preview the result with `pnpm serve`.
|
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
import { defineSiteConfig } from 'valaxy'
|
|
2
2
|
|
|
3
3
|
export default defineSiteConfig({
|
|
4
|
-
|
|
4
|
+
// Production address used by the sitemap, RSS, and llms.txt.
|
|
5
|
+
// Replace this placeholder before you publish.
|
|
6
|
+
url: 'https://example.com/',
|
|
5
7
|
lang: 'zh-CN',
|
|
6
|
-
|
|
8
|
+
timezone: 'Asia/Shanghai',
|
|
9
|
+
title: 'My Blog',
|
|
7
10
|
author: {
|
|
8
|
-
name: '
|
|
11
|
+
name: 'Your Name',
|
|
12
|
+
avatar: '/favicon.svg',
|
|
13
|
+
email: 'you@example.com',
|
|
14
|
+
link: 'https://example.com/',
|
|
9
15
|
},
|
|
10
|
-
description: '
|
|
16
|
+
description: 'A blog powered by Valaxy.',
|
|
11
17
|
social: [
|
|
12
18
|
{
|
|
13
19
|
name: 'RSS',
|
|
@@ -15,106 +21,35 @@ export default defineSiteConfig({
|
|
|
15
21
|
icon: 'i-ri-rss-line',
|
|
16
22
|
color: 'orange',
|
|
17
23
|
},
|
|
18
|
-
{
|
|
19
|
-
name: 'QQ 群 1050458482',
|
|
20
|
-
link: 'https://qm.qq.com/cgi-bin/qm/qr?k=kZJzggTTCf4SpvEQ8lXWoi5ZjhAx0ILZ&jump_from=webapi',
|
|
21
|
-
icon: 'i-ri-qq-line',
|
|
22
|
-
color: '#12B7F5',
|
|
23
|
-
},
|
|
24
24
|
{
|
|
25
25
|
name: 'GitHub',
|
|
26
|
-
link: 'https://github.com/
|
|
26
|
+
link: 'https://github.com/your-name',
|
|
27
27
|
icon: 'i-ri-github-line',
|
|
28
28
|
color: '#6e5494',
|
|
29
29
|
},
|
|
30
|
-
{
|
|
31
|
-
name: '微博',
|
|
32
|
-
link: 'https://weibo.com/jizhideyunyoujun',
|
|
33
|
-
icon: 'i-ri-weibo-line',
|
|
34
|
-
color: '#E6162D',
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
name: '豆瓣',
|
|
38
|
-
link: 'https://www.douban.com/people/yunyoujun/',
|
|
39
|
-
icon: 'i-ri-douban-line',
|
|
40
|
-
color: '#007722',
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
name: '网易云音乐',
|
|
44
|
-
link: 'https://music.163.com/#/user/home?id=247102977',
|
|
45
|
-
icon: 'i-ri-netease-cloud-music-line',
|
|
46
|
-
color: '#C20C0C',
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
name: '知乎',
|
|
50
|
-
link: 'https://www.zhihu.com/people/yunyoujun/',
|
|
51
|
-
icon: 'i-ri-zhihu-line',
|
|
52
|
-
color: '#0084FF',
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
name: '哔哩哔哩',
|
|
56
|
-
link: 'https://space.bilibili.com/1579790',
|
|
57
|
-
icon: 'i-ri-bilibili-line',
|
|
58
|
-
color: '#FF8EB3',
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
name: '微信公众号',
|
|
62
|
-
link: 'https://cdn.yunyoujun.cn/img/about/white-qrcode-and-search.jpg',
|
|
63
|
-
icon: 'i-ri-wechat-2-line',
|
|
64
|
-
color: '#1AAD19',
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
name: 'Twitter',
|
|
68
|
-
link: 'https://twitter.com/YunYouJun',
|
|
69
|
-
icon: 'i-ri-twitter-x-fill',
|
|
70
|
-
color: 'black',
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
name: 'Telegram Channel',
|
|
74
|
-
link: 'https://t.me/elpsycn',
|
|
75
|
-
icon: 'i-ri-telegram-line',
|
|
76
|
-
color: '#0088CC',
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
name: 'E-Mail',
|
|
80
|
-
link: 'mailto:me@yunyoujun.cn',
|
|
81
|
-
icon: 'i-ri-mail-line',
|
|
82
|
-
color: '#8E71C1',
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
name: 'Travelling',
|
|
86
|
-
link: 'https://www.travellings.cn/go.html',
|
|
87
|
-
icon: 'i-ri-train-line',
|
|
88
|
-
color: 'var(--va-c-text)',
|
|
89
|
-
},
|
|
90
30
|
],
|
|
91
31
|
|
|
92
32
|
search: {
|
|
93
33
|
enable: false,
|
|
94
34
|
},
|
|
95
35
|
|
|
36
|
+
// Tip and sponsor QR codes are off. Uncomment and replace the example to enable them.
|
|
96
37
|
sponsor: {
|
|
38
|
+
enable: false,
|
|
39
|
+
// title: 'Sponsor',
|
|
40
|
+
// methods: [
|
|
41
|
+
// {
|
|
42
|
+
// name: 'Example',
|
|
43
|
+
// url: 'https://example.com/sponsor-qr.png',
|
|
44
|
+
// color: '#00A3EE',
|
|
45
|
+
// icon: 'i-ri-heart-line',
|
|
46
|
+
// },
|
|
47
|
+
// ],
|
|
48
|
+
},
|
|
49
|
+
|
|
50
|
+
// `pnpm build` writes dist/llms.txt, dist/llms-full.txt, and post Markdown.
|
|
51
|
+
// That publishes post Markdown with the site. Turn it off with `llms.enable: false`.
|
|
52
|
+
llms: {
|
|
97
53
|
enable: true,
|
|
98
|
-
title: '我很可爱,请给我钱!',
|
|
99
|
-
methods: [
|
|
100
|
-
{
|
|
101
|
-
name: '支付宝',
|
|
102
|
-
url: 'https://cdn.yunyoujun.cn/img/donate/alipay-qrcode.jpg',
|
|
103
|
-
color: '#00A3EE',
|
|
104
|
-
icon: 'i-ri-alipay-line',
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
name: 'QQ 支付',
|
|
108
|
-
url: 'https://cdn.yunyoujun.cn/img/donate/qqpay-qrcode.png',
|
|
109
|
-
color: '#12B7F5',
|
|
110
|
-
icon: 'i-ri-qq-line',
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
name: '微信支付',
|
|
114
|
-
url: 'https://cdn.yunyoujun.cn/img/donate/wechatpay-qrcode.jpg',
|
|
115
|
-
color: '#2DC100',
|
|
116
|
-
icon: 'i-ri-wechat-pay-line',
|
|
117
|
-
},
|
|
118
|
-
],
|
|
119
54
|
},
|
|
120
55
|
})
|
|
@@ -14,33 +14,36 @@ export default defineValaxyConfig<UserThemeConfig>({
|
|
|
14
14
|
|
|
15
15
|
theme: 'yun',
|
|
16
16
|
|
|
17
|
+
// Local read-only MCP stays off. Uncomment to enable it while running `pnpm dev`.
|
|
18
|
+
// Production builds do not include the server.
|
|
19
|
+
// https://valaxy.site/guide/work-with-ai#mcp
|
|
20
|
+
// mcp: true,
|
|
21
|
+
|
|
17
22
|
themeConfig: {
|
|
18
23
|
banner: {
|
|
19
24
|
enable: true,
|
|
20
|
-
title: '
|
|
25
|
+
title: '我的小站',
|
|
21
26
|
},
|
|
22
27
|
|
|
23
28
|
pages: [
|
|
24
29
|
{
|
|
25
|
-
name: '
|
|
30
|
+
name: '友情链接',
|
|
26
31
|
url: '/links/',
|
|
27
|
-
icon: 'i-ri-
|
|
32
|
+
icon: 'i-ri-link',
|
|
28
33
|
color: 'dodgerblue',
|
|
29
34
|
},
|
|
30
|
-
{
|
|
31
|
-
name: '喜欢的女孩子',
|
|
32
|
-
url: '/girls/',
|
|
33
|
-
icon: 'i-ri-women-line',
|
|
34
|
-
color: 'hotpink',
|
|
35
|
-
},
|
|
36
35
|
],
|
|
37
36
|
|
|
38
37
|
footer: {
|
|
39
|
-
since:
|
|
38
|
+
// since: 2026,
|
|
39
|
+
// Theme default links this icon to a personal sponsor page. Point it at your site.
|
|
40
|
+
icon: {
|
|
41
|
+
url: 'https://example.com/',
|
|
42
|
+
title: 'My Blog',
|
|
43
|
+
},
|
|
40
44
|
beian: {
|
|
41
|
-
enable:
|
|
42
|
-
icp: '
|
|
43
|
-
police: '苏公网安备xxxxxx号',
|
|
45
|
+
enable: false,
|
|
46
|
+
icp: '',
|
|
44
47
|
},
|
|
45
48
|
},
|
|
46
49
|
},
|
|
@@ -4,10 +4,23 @@ export default defineSiteConfig({
|
|
|
4
4
|
// Replace with your deployed site URL before publishing.
|
|
5
5
|
url: 'https://example.com/',
|
|
6
6
|
lang: 'en',
|
|
7
|
+
timezone: 'UTC',
|
|
7
8
|
title: 'My Site',
|
|
9
|
+
author: {
|
|
10
|
+
name: 'Your Name',
|
|
11
|
+
avatar: '/favicon.svg',
|
|
12
|
+
email: 'you@example.com',
|
|
13
|
+
link: 'https://example.com/',
|
|
14
|
+
},
|
|
8
15
|
description: 'My documentation site powered by Valaxy.',
|
|
9
16
|
search: {
|
|
10
17
|
enable: true,
|
|
11
18
|
provider: 'fuse',
|
|
12
19
|
},
|
|
20
|
+
|
|
21
|
+
// `pnpm build` writes dist/llms.txt, dist/llms-full.txt, and post Markdown.
|
|
22
|
+
// That publishes post Markdown with the site. Turn it off with `llms.enable: false`.
|
|
23
|
+
llms: {
|
|
24
|
+
enable: true,
|
|
25
|
+
},
|
|
13
26
|
})
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { defineValaxyConfig } from 'valaxy'
|
|
2
2
|
|
|
3
3
|
export default defineValaxyConfig({
|
|
4
|
+
// Local read-only MCP stays off. Uncomment to enable it while running `pnpm dev`.
|
|
5
|
+
// Production builds do not include the server.
|
|
6
|
+
// https://valaxy.site/guide/work-with-ai#mcp
|
|
7
|
+
// mcp: true,
|
|
8
|
+
|
|
4
9
|
theme: 'press',
|
|
5
10
|
themeConfig: {
|
|
6
11
|
nav: [
|
package/template-blog/_npmrc
DELETED