mirror of https://github.com/YunYouJun/valaxy
docs: add tip for github pages & upgrade deps
This commit is contained in:
parent
083bd1a66c
commit
ae23d909ef
|
@ -9,9 +9,9 @@
|
|||
"typedoc": "typedoc --options ./typedoc.json"
|
||||
},
|
||||
"devDependencies": {
|
||||
"typedoc": "^0.26.8",
|
||||
"typedoc": "^0.26.10",
|
||||
"typedoc-plugin-markdown": "^4.2.9",
|
||||
"typedoc-vitepress-theme": "^1.0.2",
|
||||
"vitepress": "^1.4.0"
|
||||
"vitepress": "^1.4.1"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"name": "valaxy-theme-custom",
|
||||
"version": "0.0.0",
|
||||
"private": true,
|
||||
"packageManager": "pnpm@9.12.1",
|
||||
"packageManager": "pnpm@9.12.2",
|
||||
"author": {
|
||||
"email": "me@yunyoujun.cn",
|
||||
"name": "YunYouJun",
|
||||
|
@ -23,6 +23,6 @@
|
|||
"types": "types/index.d.ts",
|
||||
"dependencies": {
|
||||
"@iconify-json/ant-design": "^1.2.2",
|
||||
"@iconify-json/simple-icons": "^1.2.7"
|
||||
"@iconify-json/simple-icons": "^1.2.8"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
"valaxy-theme-yun": "workspace:*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@iconify-json/carbon": "^1.2.2",
|
||||
"@iconify-json/carbon": "^1.2.3",
|
||||
"nodemon": "^3.1.7"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ export default defineThemeConfig({
|
|||
// color: 'hotpink',
|
||||
},
|
||||
{
|
||||
name: '老婆列表',
|
||||
name: '赞助者们',
|
||||
url: '/sponsors/',
|
||||
icon: 'i-ri-heart-line',
|
||||
color: 'red',
|
||||
|
|
|
@ -21,10 +21,10 @@
|
|||
"valaxy-theme-press": "link:../packages/valaxy-theme-press"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@iconify-json/carbon": "^1.2.2",
|
||||
"@iconify-json/simple-icons": "^1.2.7",
|
||||
"@iconify-json/carbon": "^1.2.3",
|
||||
"@iconify-json/simple-icons": "^1.2.8",
|
||||
"nodemon": "^3.1.7",
|
||||
"vite": "^5.4.8",
|
||||
"vite": "^5.4.9",
|
||||
"vitepress": "1.1.4"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -59,7 +59,7 @@ You can configure shortcut scripts in `package.json`. (**Suggested**)
|
|||
"build": "npm run build:ssg",
|
||||
"build:spa": "valaxy build",
|
||||
"build:ssg": "valaxy build --ssg",
|
||||
"dev": "valaxy .",
|
||||
"dev": "valaxy dev",
|
||||
"new": "valaxy new",
|
||||
"rss": "valaxy rss"
|
||||
}
|
||||
|
|
|
@ -49,12 +49,16 @@ npm run build
|
|||
|
||||
第三方部署的各配置文件已内置在 Valaxy 的初始化模版项目中,您可以按需使用。
|
||||
|
||||
如果部署失败,推荐您先在本地通过 `npm run build` 检查潜在的构建错误。
|
||||
|
||||
</div>
|
||||
|
||||
<div lang="en">
|
||||
|
||||
The configuration files for the following third-party deployments are built into the Valaxy template project. You can use them as needed.
|
||||
|
||||
If the deployment fails, we recommend that you first check for potential build errors locally using `npm run build`.
|
||||
|
||||
</div>
|
||||
|
||||
:::
|
||||
|
@ -63,6 +67,32 @@ The configuration files for the following third-party deployments are built into
|
|||
|
||||
<BrandIcon icon="i-logos:github-icon" link="https://pages.github.com/" />
|
||||
|
||||
::: tip
|
||||
|
||||
<div lang="zh-CN">
|
||||
|
||||
当您使用 GitHub Pages 托管时,请确保您的仓库名为 `你的用户名.github.io`。
|
||||
|
||||
这是因为当存在同名目录时,GitHub Pages 会默认为您分配 `你的用户名.github.io` 作为你的个人域名。
|
||||
|
||||
> 尽管您也可以将其重命名为其他名称,并设置自定义域名等。(更多的进阶操作,可自行搜索。)
|
||||
> 但作为新手,我更推荐您遵循默认规则,以避免意想不到的错误。
|
||||
|
||||
</div>
|
||||
|
||||
<div lang="en">
|
||||
|
||||
When you use GitHub Pages for hosting, make sure your repository name is `your-username.github.io`.
|
||||
|
||||
This is because when there is a directory with the same name, GitHub Pages will default to assigning `your-username.github.io` as your personal domain.
|
||||
|
||||
> Although you can rename it to other names and set custom domains, etc. (For more advanced operations, you can search by yourself.)
|
||||
> But as a beginner, I recommend you follow the default rules to avoid unexpected errors.
|
||||
|
||||
</div>
|
||||
|
||||
:::
|
||||
|
||||
::: details .github/workflows/gh-pages.yml
|
||||
<<< @/../packages/create-valaxy/template-blog/.github/workflows/gh-pages.yml
|
||||
:::
|
||||
|
@ -145,7 +175,7 @@ When you use `pnpm create valaxy` to create a template project, it contains the
|
|||
|
||||
::: zh-CN
|
||||
|
||||
- 登录你的 Cloudflare 账号,导航到 “Pages” 页面。
|
||||
- 登录你的 [Cloudflare](https://www.cloudflare-cn.com/) 账号,从侧边栏导航至 “Workers 和 Pages” 页面。
|
||||
- 点击 `创建项目`、`连接到 Git`,选择你的 GitHub 或者 GitLab 仓库,并点击 `开始设置`。
|
||||
- 选择你的部署分支。
|
||||
- 将 `构建命令` 设置为 `pnpm build` 。
|
||||
|
@ -155,7 +185,7 @@ When you use `pnpm create valaxy` to create a template project, it contains the
|
|||
|
||||
::: en
|
||||
|
||||
- Login to your Cloudflare account and navigate to "Pages" page.
|
||||
- Login to your Cloudflare account and navigate to "Workers and Pages" page.
|
||||
- Click `Create a project` and `Connect to Git`, then select your GitHub or GitLab repository and click `Begin setup`.
|
||||
- Select your Production branch.
|
||||
- Set `Build output directory` to `pnpm build` .
|
||||
|
|
15
package.json
15
package.json
|
@ -3,7 +3,7 @@
|
|||
"type": "module",
|
||||
"version": "0.20.0",
|
||||
"private": true,
|
||||
"packageManager": "pnpm@9.12.1",
|
||||
"packageManager": "pnpm@9.12.2",
|
||||
"description": "📄 Vite & Vue powered static blog generator.",
|
||||
"author": {
|
||||
"email": "me@yunyoujun.cn",
|
||||
|
@ -34,6 +34,7 @@
|
|||
"build:cf:docs": "tsx scripts/build-cf-docs.ts",
|
||||
"build:docs": "npm run docs:build",
|
||||
"build:devtools": "pnpm -C packages/devtools run build",
|
||||
"cli:debug": "tsx packages/valaxy/node/cli/index.ts debug",
|
||||
"ci": "pnpm run build && pnpm build:create-valaxy && node packages/create-valaxy/dist/index.mjs -y",
|
||||
"ci:publish": "pnpm -r publish --access public --no-git-checks",
|
||||
"custom": "pnpm -C demo/custom run dev",
|
||||
|
@ -81,33 +82,33 @@
|
|||
"@antfu/eslint-config": "2.17.0",
|
||||
"@iconify-json/logos": "^1.2.3",
|
||||
"@iconify-json/vscode-icons": "^1.2.2",
|
||||
"@microsoft/api-extractor": "^7.47.9",
|
||||
"@playwright/test": "^1.48.0",
|
||||
"@microsoft/api-extractor": "^7.47.11",
|
||||
"@playwright/test": "^1.48.1",
|
||||
"@types/debug": "^4.1.12",
|
||||
"@types/markdown-it-attrs": "^4.1.3",
|
||||
"@types/markdown-it-container": "^2.0.10",
|
||||
"@types/markdown-it-emoji": "^3.0.1",
|
||||
"@types/node": "^22.7.5",
|
||||
"@types/node": "^22.7.7",
|
||||
"@types/prompts": "^2.4.9",
|
||||
"@types/resolve": "^1.20.6",
|
||||
"bumpp": "^9.7.1",
|
||||
"cross-env": "^7.0.3",
|
||||
"decap-cms-app": "^3.3.3",
|
||||
"eslint": "^9.12.0",
|
||||
"eslint": "^9.13.0",
|
||||
"https-localhost": "^4.7.1",
|
||||
"husky": "^9.1.6",
|
||||
"lint-staged": "^15.2.10",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"prompts": "^2.4.2",
|
||||
"rimraf": "^6.0.1",
|
||||
"stylelint": "^16.9.0",
|
||||
"stylelint": "^16.10.0",
|
||||
"stylelint-config-recommended-vue": "^1.5.0",
|
||||
"stylelint-config-standard-scss": "^13.1.0",
|
||||
"tsup": "^8.3.0",
|
||||
"tsx": "^4.19.1",
|
||||
"typescript": "^5.6.3",
|
||||
"unbuild": "^2.0.0",
|
||||
"vitest": "^2.1.2",
|
||||
"vitest": "^2.1.3",
|
||||
"vue-tsc": "2.0.17",
|
||||
"zx": "^8.1.9"
|
||||
},
|
||||
|
|
|
@ -33,8 +33,8 @@
|
|||
"body-parser": "^1.20.3",
|
||||
"http-proxy-middleware": "^3.0.3",
|
||||
"js-yaml": "^4.1.0",
|
||||
"picocolors": "^1.1.0",
|
||||
"sirv": "^2.0.4"
|
||||
"picocolors": "^1.1.1",
|
||||
"sirv": "^3.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@advjs/gui": "0.0.7-beta.1",
|
||||
|
@ -46,6 +46,6 @@
|
|||
"typescript": "^5.6.3",
|
||||
"unbuild": "^2.0.0",
|
||||
"unplugin-vue-router": "^0.10.8",
|
||||
"vite": "^5.4.8"
|
||||
"vite": "^5.4.9"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
<script setup lang="ts">
|
||||
import { useMotion } from '@vueuse/motion'
|
||||
import Popover from 'primevue/popover'
|
||||
import type { ComponentInstance } from 'vue'
|
||||
import { onMounted, ref } from 'vue'
|
||||
|
||||
const op = ref<typeof Popover>()
|
||||
const op = ref<ComponentInstance<typeof Popover>>()
|
||||
|
||||
const pContentRef = ref<HTMLElement>()
|
||||
const motion = useMotion(pContentRef, {
|
||||
|
|
|
@ -41,7 +41,6 @@ const showNotice = computed(() => {
|
|||
<slot>
|
||||
<RouterView />
|
||||
</slot>
|
||||
|
||||
<YunFooter />
|
||||
</YunLayoutWrapper>
|
||||
<YunFooter />
|
||||
</template>
|
||||
|
|
|
@ -4,6 +4,8 @@ import type { ThemeConfig, UserThemeConfig } from '../types'
|
|||
* Default Config
|
||||
*/
|
||||
export const defaultThemeConfig: ThemeConfig = {
|
||||
type: 'nimbo',
|
||||
|
||||
valaxyDarkOptions: {
|
||||
circleTransition: true,
|
||||
},
|
||||
|
|
|
@ -27,11 +27,11 @@
|
|||
"@ctrl/tinycolor": "^4.1.0",
|
||||
"@explosions/fireworks": "^0.1.0",
|
||||
"@iconify-json/ant-design": "^1.2.2",
|
||||
"@iconify-json/simple-icons": "^1.2.7",
|
||||
"@vueuse/motion": "^2.2.5",
|
||||
"@iconify-json/simple-icons": "^1.2.8",
|
||||
"@vueuse/motion": "^2.2.6",
|
||||
"animejs": "^3.2.2",
|
||||
"gsap": "^3.12.5",
|
||||
"primevue": "^4.1.0",
|
||||
"primevue": "^4.1.1",
|
||||
"radix-vue": "^1.9.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
|
|
@ -50,6 +50,17 @@ export interface PageProps {
|
|||
* Theme Config
|
||||
*/
|
||||
export interface ThemeConfig extends DefaultTheme.Config {
|
||||
/**
|
||||
* Theme Type
|
||||
* - v1 strato 层云 Legacy
|
||||
* - v2 nimbo 雨云
|
||||
* - cirro 卷云 (未来)
|
||||
* - cumulo 积云 (未来)
|
||||
* - alto 高云 (未来)
|
||||
* @default 'nimbo'
|
||||
*/
|
||||
type: 'strato' | 'nimbo'
|
||||
|
||||
/**
|
||||
* toc title
|
||||
* @default 'On this page'
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
import consola from 'consola'
|
||||
import type { Argv } from 'yargs'
|
||||
|
||||
/**
|
||||
* @TODO valaxy debug
|
||||
*/
|
||||
export function registerDebugCommand(cli: Argv) {
|
||||
cli.command('debug', 'Debug your blog', async () => {
|
||||
consola.info('提问前请携带以下信息:')
|
||||
})
|
||||
}
|
|
@ -15,6 +15,7 @@ import { registerBuildCommand } from './build'
|
|||
import { registerDevCommand } from './dev'
|
||||
import { registerCleanCommand } from './clean'
|
||||
import { registerDeployCommand } from './deploy'
|
||||
import { registerDebugCommand } from './debug'
|
||||
|
||||
export const cli = yargs(hideBin(process.argv)).scriptName('valaxy')
|
||||
.usage('$0 [args]')
|
||||
|
@ -28,6 +29,7 @@ registerBuildCommand(cli)
|
|||
registerNewCommand(cli)
|
||||
registerCleanCommand(cli)
|
||||
registerDeployCommand(cli)
|
||||
registerDebugCommand(cli)
|
||||
|
||||
const modules: ValaxyModule[] = [
|
||||
fuseModule,
|
||||
|
|
|
@ -69,13 +69,13 @@
|
|||
"@intlify/unplugin-vue-i18n": "4",
|
||||
"@types/katex": "^0.16.7",
|
||||
"@types/luxon": "^3.4.2",
|
||||
"@unhead/addons": "^1.11.7",
|
||||
"@unhead/schema-org": "^1.11.7",
|
||||
"@unhead/vue": "^1.11.7",
|
||||
"@unhead/addons": "^1.11.10",
|
||||
"@unhead/schema-org": "^1.11.10",
|
||||
"@unhead/vue": "^1.11.10",
|
||||
"@valaxyjs/devtools": "workspace:*",
|
||||
"@valaxyjs/utils": "workspace:*",
|
||||
"@vitejs/plugin-vue": "^5.1.4",
|
||||
"@vue/devtools-api": "^7.4.6",
|
||||
"@vue/devtools-api": "^7.5.2",
|
||||
"@vueuse/core": "^11.1.0",
|
||||
"@vueuse/integrations": "^11.1.0",
|
||||
"consola": "^3.2.3",
|
||||
|
@ -120,7 +120,8 @@
|
|||
"pathe": "^1.1.2",
|
||||
"pinia": "^2.2.4",
|
||||
"qrcode": "^1.5.4",
|
||||
"sass": "^1.79.4",
|
||||
"resolve": "^1.22.8",
|
||||
"sass": "^1.80.3",
|
||||
"shiki": "^1.22.0",
|
||||
"star-markdown-css": "^0.5.2",
|
||||
"unocss": "^0.63.4",
|
||||
|
@ -128,12 +129,12 @@
|
|||
"unplugin-vue-markdown": "^0.26.2",
|
||||
"unplugin-vue-router": "^0.10.8",
|
||||
"vanilla-lazyload": "^19.1.3",
|
||||
"vite": "^5.4.8",
|
||||
"vite-plugin-vue-devtools": "^7.4.6",
|
||||
"vite": "^5.4.9",
|
||||
"vite-plugin-vue-devtools": "^7.5.2",
|
||||
"vite-plugin-vue-layouts": "0.11.0",
|
||||
"vite-ssg": "0.23.7",
|
||||
"vite-ssg-sitemap": "0.6.1",
|
||||
"vue": "^3.5.11",
|
||||
"vue": "^3.5.12",
|
||||
"vue-i18n": "^10.0.4",
|
||||
"vue-router": "^4.4.5",
|
||||
"yargs": "^17.7.2"
|
||||
|
|
2091
pnpm-lock.yaml
2091
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"type": "module",
|
||||
"devDependencies": {
|
||||
"picocolors": "^1.1.0",
|
||||
"picocolors": "^1.1.1",
|
||||
"zx": "^8.1.9"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue