create-valaxy 1.2.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 CHANGED
@@ -1,6 +1,6 @@
1
- import x from"node:process";import r from"node:fs";import l 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.0",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 p=`valaxy-theme-${o.trim()}`;return console.log(` ${t.dim("npx")} ${t.gray("degit")} ${t.blue(N.repo)} ${t.yellow(p)}`),await E("npx",["degit",N.repo,p],{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 l.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){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 p=l.resolve(e,o),g=l.resolve(n,o);_(p,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(l.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,p=u.port||u.p;let g=e||re;const S=()=>g==="."?l.basename(l.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 i=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 y=a.color;return{title:y(a.display||a.name)+t.dim(` - ${a.desc}`),value:a}})});if(!C&&!c.template)return;if(i=c.template||i,i.name==="blog"){const a=await v({type:"select",name:"theme",message:t.reset("Select a theme:"),initial:0,choices:Z.map(y=>{const h=y.color;return{title:h(y.display)+t.dim(` - ${y.desc}`),value:y.name}})});if(a.theme==="custom"){const y=await v({type:"text",name:"themeName",message:t.reset('Theme name (e.g. "starter" or "valaxy-theme-starter"):'),initial:"yun"});f=X(y.themeName||"yun")}else f=a.theme||"yun"}try{b=await v([{type:e?null:"text",name:"projectName",message:t.reset(i.message),initial:i.initial,onState:a=>{g=O(i.prefix?i.prefix+a.value:a.value)||i.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:y})=>{if(y===!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||(i.prefix?i.prefix+T:T),s=l.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}),i.customInit)await i.customInit({themeName:T});else{const c=l.resolve(ie,"../..",`template-${i.name}`),a=(m,d)=>{const $=l.join(s,W[m]??m);d?r.writeFileSync($,d):_(l.join(c,m),$)},y=r.readdirSync(c);for(const m of y.filter(d=>d!=="package.json"))a(m);const h=JSON.parse(r.readFileSync(l.join(c,"package.json"),"utf-8"));if(h.name=H||P(l.basename(s)),i.name==="blog"){const m=ee(h,f);Object.assign(h,m)}if(a("package.json",`${JSON.stringify(h,null,2)}
3
- `),i.name==="blog")if(Q(f)){const m=L(f),d=r.readdirSync(m);for(const $ of d)_(l.join(m,$),l.join(s,$))}else{const m=l.join(s,"valaxy.config.ts");if(r.existsSync(m)){const d=r.readFileSync(m,"utf-8");r.writeFileSync(m,te(d,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=l.relative(D,s);if(console.log(t.green(` Done.
4
- `)),i.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,p?["run","dev","--port",p]:["run","dev"],{stdio:"inherit",cwd:s})}else{switch(console.log(t.dim(`
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.2.0",
4
+ "version": "1.2.1",
5
5
  "description": "Create Starter Template for Valaxy",
6
6
  "author": {
7
7
  "email": "me@yunyoujun.cn",
@@ -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.
@@ -28,11 +28,13 @@ Use your publication date. Save the file, then open `/posts/first-post` or click
28
28
 
29
29
  ### Config
30
30
 
31
- Edit `site.config.ts` for `title`, `author.name`, `description`, `lang`, and your production `url`. The URL is used in post links, RSS, and the sitemap; replace the example before deployment.
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
32
 
33
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
34
 
35
- Edit `valaxy.config.ts` for theme and framework options. Yun's large home page text uses `themeConfig.banner.title`. Replace or disable the template's example social links, sponsorship details, and footer registration information before deployment.
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.
36
38
 
37
39
  ### Build and preview
38
40
 
@@ -68,6 +70,7 @@ In most cases, you only need to work in the `pages` folder.
68
70
 
69
71
  ### Other
70
72
 
73
+ - `AGENTS.md`: notes for coding agents working in this site
71
74
  - `.vscode`: recommend some useful plugins & settings, you can preview icon/i18n/class...
72
75
  - `.github`: GitHub Actions to auto build & deploy to GitHub Pages
73
76
  - `netlify.toml`: for [netlify](https://www.netlify.com/)
@@ -15,8 +15,8 @@
15
15
  "serve": "vite preview"
16
16
  },
17
17
  "dependencies": {
18
- "valaxy": "1.2.0",
19
- "valaxy-theme-yun": "1.2.0",
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
- I am developing [Valaxy](https://github.com/YunYouJun/valaxy) - Next Generation Static Blog Framework.
5
+ Replace this page with a short introduction.
6
6
 
7
- If you like it, you can sponsor me in [GitHub](https://github.com/sponsors/YunYouJun) or [www.yunyoujun.cn/sponsors/](https://www.yunyoujun.cn/sponsors/).
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 + valaxy-theme-yun Demo Site
5
+ This site is built with [Valaxy](https://valaxy.site/) and valaxy-theme-yun.
6
6
 
7
- - Default Theme: [valaxy-theme-yun](https://github.com/YunYouJun/valaxy/blob/main/packages/valaxy-theme-yun/)
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: https://friends.yunyoujun.cn/links.json
6
- random: true
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" />
@@ -0,0 +1,7 @@
1
+ # Generated feed and search files. pnpm 12 does not apply a negated
2
+ # `files` pattern two directories deep, so this nested ignore keeps them
3
+ # out of the create-valaxy tarball.
4
+ atom.xml
5
+ feed.xml
6
+ feed.json
7
+ valaxy-fuse-list.json
@@ -1,14 +1,19 @@
1
1
  import { defineSiteConfig } from 'valaxy'
2
2
 
3
3
  export default defineSiteConfig({
4
- url: 'https://valaxy.site/',
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',
7
- title: 'Valaxy Theme Yun',
9
+ title: 'My Blog',
8
10
  author: {
9
- name: '云游君',
11
+ name: 'Your Name',
12
+ avatar: '/favicon.svg',
13
+ email: 'you@example.com',
14
+ link: 'https://example.com/',
10
15
  },
11
- description: 'Valaxy Theme Yun Preview.',
16
+ description: 'A blog powered by Valaxy.',
12
17
  social: [
13
18
  {
14
19
  name: 'RSS',
@@ -16,106 +21,35 @@ export default defineSiteConfig({
16
21
  icon: 'i-ri-rss-line',
17
22
  color: 'orange',
18
23
  },
19
- {
20
- name: 'QQ 群 1050458482',
21
- link: 'https://qm.qq.com/cgi-bin/qm/qr?k=kZJzggTTCf4SpvEQ8lXWoi5ZjhAx0ILZ&jump_from=webapi',
22
- icon: 'i-ri-qq-line',
23
- color: '#12B7F5',
24
- },
25
24
  {
26
25
  name: 'GitHub',
27
- link: 'https://github.com/YunYouJun',
26
+ link: 'https://github.com/your-name',
28
27
  icon: 'i-ri-github-line',
29
28
  color: '#6e5494',
30
29
  },
31
- {
32
- name: '微博',
33
- link: 'https://weibo.com/jizhideyunyoujun',
34
- icon: 'i-ri-weibo-line',
35
- color: '#E6162D',
36
- },
37
- {
38
- name: '豆瓣',
39
- link: 'https://www.douban.com/people/yunyoujun/',
40
- icon: 'i-ri-douban-line',
41
- color: '#007722',
42
- },
43
- {
44
- name: '网易云音乐',
45
- link: 'https://music.163.com/#/user/home?id=247102977',
46
- icon: 'i-ri-netease-cloud-music-line',
47
- color: '#C20C0C',
48
- },
49
- {
50
- name: '知乎',
51
- link: 'https://www.zhihu.com/people/yunyoujun/',
52
- icon: 'i-ri-zhihu-line',
53
- color: '#0084FF',
54
- },
55
- {
56
- name: '哔哩哔哩',
57
- link: 'https://space.bilibili.com/1579790',
58
- icon: 'i-ri-bilibili-line',
59
- color: '#FF8EB3',
60
- },
61
- {
62
- name: '微信公众号',
63
- link: 'https://cdn.yunyoujun.cn/img/about/white-qrcode-and-search.jpg',
64
- icon: 'i-ri-wechat-2-line',
65
- color: '#1AAD19',
66
- },
67
- {
68
- name: 'Twitter',
69
- link: 'https://twitter.com/YunYouJun',
70
- icon: 'i-ri-twitter-x-fill',
71
- color: 'black',
72
- },
73
- {
74
- name: 'Telegram Channel',
75
- link: 'https://t.me/elpsycn',
76
- icon: 'i-ri-telegram-line',
77
- color: '#0088CC',
78
- },
79
- {
80
- name: 'E-Mail',
81
- link: 'mailto:me@yunyoujun.cn',
82
- icon: 'i-ri-mail-line',
83
- color: '#8E71C1',
84
- },
85
- {
86
- name: 'Travelling',
87
- link: 'https://www.travellings.cn/go.html',
88
- icon: 'i-ri-train-line',
89
- color: 'var(--va-c-text)',
90
- },
91
30
  ],
92
31
 
93
32
  search: {
94
33
  enable: false,
95
34
  },
96
35
 
36
+ // Tip and sponsor QR codes are off. Uncomment and replace the example to enable them.
97
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: {
98
53
  enable: true,
99
- title: '我很可爱,请给我钱!',
100
- methods: [
101
- {
102
- name: '支付宝',
103
- url: 'https://cdn.yunyoujun.cn/img/donate/alipay-qrcode.jpg',
104
- color: '#00A3EE',
105
- icon: 'i-ri-alipay-line',
106
- },
107
- {
108
- name: 'QQ 支付',
109
- url: 'https://cdn.yunyoujun.cn/img/donate/qqpay-qrcode.png',
110
- color: '#12B7F5',
111
- icon: 'i-ri-qq-line',
112
- },
113
- {
114
- name: '微信支付',
115
- url: 'https://cdn.yunyoujun.cn/img/donate/wechatpay-qrcode.jpg',
116
- color: '#2DC100',
117
- icon: 'i-ri-wechat-pay-line',
118
- },
119
- ],
120
54
  },
121
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-genderless-line',
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: 2016,
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: true,
42
- icp: '苏ICP备17038157号',
43
- police: '苏公网安备xxxxxx号',
45
+ enable: false,
46
+ icp: '',
44
47
  },
45
48
  },
46
49
  },
@@ -0,0 +1,5 @@
1
+ # Generated feed and search files. See template-blog/public/.npmignore.
2
+ atom.xml
3
+ feed.xml
4
+ feed.json
5
+ valaxy-fuse-list.json
@@ -6,9 +6,21 @@ export default defineSiteConfig({
6
6
  lang: 'en',
7
7
  timezone: 'UTC',
8
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
+ },
9
15
  description: 'My documentation site powered by Valaxy.',
10
16
  search: {
11
17
  enable: true,
12
18
  provider: 'fuse',
13
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
+ },
14
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: [