mirror of https://github.com/YunYouJun/valaxy
chore: upgrade deps & docs
This commit is contained in:
parent
86c1578162
commit
7fdf3bb69a
|
@ -362,3 +362,96 @@ sponsor: false
|
|||
::: en
|
||||
Please refer to [Using Themes](/themes/use) and the theme you are using to configure it.
|
||||
:::
|
||||
|
||||
## Valaxy 扩展配置
|
||||
|
||||
> [packages/valaxy/node/type.ts](https://github.com/YunYouJun/valaxy/blob/main/packages/valaxy/node/types.ts)
|
||||
|
||||
### Unocss Presets
|
||||
|
||||
```ts
|
||||
// types
|
||||
export interface ValaxyExtendConfig {
|
||||
/**
|
||||
* Markdown Feature
|
||||
*/
|
||||
features: {
|
||||
/**
|
||||
* enable katex for global
|
||||
*/
|
||||
katex: boolean
|
||||
}
|
||||
|
||||
vite?: ViteUserConfig
|
||||
vue?: Parameters<typeof Vue>[0]
|
||||
components?: Parameters<typeof Components>[0]
|
||||
unocss?: UnoCSSConfig
|
||||
/**
|
||||
* unocss presets
|
||||
*/
|
||||
unocssPresets?: {
|
||||
uno?: Parameters<typeof presetUno>[0]
|
||||
attributify?: Parameters<typeof presetAttributify>[0]
|
||||
icons?: Parameters<typeof presetIcons>[0]
|
||||
typography?: Parameters<typeof presetTypography>[0]
|
||||
}
|
||||
pages?: Parameters<typeof Pages>[0]
|
||||
/**
|
||||
* for markdown
|
||||
*/
|
||||
markdown?: MarkdownOptions
|
||||
extendMd?: (ctx: {
|
||||
route: {
|
||||
meta: { frontmatter: Record<string, any>; layout?: string } & {}
|
||||
path: string
|
||||
component: string
|
||||
}
|
||||
data: Readonly<Record<string, any>>
|
||||
content: string
|
||||
excerpt?: string
|
||||
path: string
|
||||
}) => void
|
||||
addons?: ValaxyAddons
|
||||
}
|
||||
```
|
||||
|
||||
So you can use it like this:
|
||||
|
||||
```ts
|
||||
// valaxy.config.ts
|
||||
import { defineValaxyConfig } from 'valaxy'
|
||||
import type { ThemeConfig } from 'valaxy-theme-yun'
|
||||
import { addonComponents } from 'valaxy-addon-components'
|
||||
import Inspect from 'vite-plugin-inspect'
|
||||
|
||||
const safelist = [
|
||||
'i-ri-home-line',
|
||||
]
|
||||
|
||||
export default defineValaxyConfig<ThemeConfig>({
|
||||
// site config see site.config.ts or write in siteConfig
|
||||
siteConfig: {},
|
||||
|
||||
theme: 'yun',
|
||||
themeConfig: {
|
||||
banner: {
|
||||
enable: true,
|
||||
title: '云游君的小站',
|
||||
},
|
||||
},
|
||||
|
||||
vite: {
|
||||
// https://github.com/antfu/vite-plugin-inspect
|
||||
// Visit http://localhost:3333/__inspect/ to see the inspector
|
||||
plugins: [Inspect()],
|
||||
},
|
||||
|
||||
unocss: {
|
||||
safelist,
|
||||
},
|
||||
|
||||
addons: [
|
||||
addonComponents()
|
||||
],
|
||||
})
|
||||
```
|
||||
|
|
|
@ -50,11 +50,13 @@ If you want some reference, you can refer to [valaxy-theme-yun](https://github.c
|
|||
你可以在 Markdown 中如下使用它。
|
||||
:::
|
||||
|
||||
::: en
|
||||
Valaxy provides custom layouts based on [vite-plugin-vue-layouts](https://github.com/JohnCampionJr/vite-plugin-vue-layouts).
|
||||
|
||||
Create a `layouts` file, and write Vue components as layouts.
|
||||
|
||||
You can use it in your Markdown as follows.
|
||||
:::
|
||||
|
||||
```md
|
||||
---
|
||||
|
@ -114,7 +116,7 @@ export default defineAppSetup((ctx) => {
|
|||
})
|
||||
```
|
||||
|
||||
> 具体示例可参见 [谷歌统计|第三方集成](/guide/third-party#谷歌统计)。
|
||||
> 具体示例可参见 [谷歌统计|第三方集成](/guide/third-party/#谷歌统计)。
|
||||
:::
|
||||
|
||||
::: en
|
||||
|
@ -131,7 +133,7 @@ export default defineAppSetup((ctx) => {
|
|||
})
|
||||
```
|
||||
|
||||
> For a detailed example, please see [Google Analytics | Third Party Integration](/guide/third-party#谷歌统计)。
|
||||
> For a detailed example, please see [Google Analytics | Third Party Integration](/guide/third-party/#谷歌统计)。
|
||||
:::
|
||||
|
||||
## 多语言支持 {lang="zh-CN"}
|
||||
|
|
14
package.json
14
package.json
|
@ -41,16 +41,16 @@
|
|||
"prepare": "husky install"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@antfu/eslint-config": "^0.35.2",
|
||||
"@antfu/eslint-config": "^0.35.3",
|
||||
"@microsoft/api-extractor": "^7.34.4",
|
||||
"@types/debug": "^4.1.7",
|
||||
"@types/node": "^18.14.0",
|
||||
"@types/node": "^18.14.2",
|
||||
"@types/prompts": "^2.4.2",
|
||||
"@types/resolve": "^1.20.2",
|
||||
"@types/semver": "^7.3.13",
|
||||
"cross-env": "^7.0.3",
|
||||
"cypress": "^12.6.0",
|
||||
"eslint": "^8.34.0",
|
||||
"cypress": "^12.7.0",
|
||||
"eslint": "^8.35.0",
|
||||
"eslint-plugin-cypress": "^2.12.1",
|
||||
"https-localhost": "^4.7.1",
|
||||
"husky": "^8.0.3",
|
||||
|
@ -67,9 +67,9 @@
|
|||
"valaxy-addon-waline": "workspace:*",
|
||||
"valaxy-theme-press": "workspace:*",
|
||||
"valaxy-theme-yun": "workspace:*",
|
||||
"vitest": "^0.28.5",
|
||||
"vue-tsc": "1.1.7",
|
||||
"zx": "^7.1.1"
|
||||
"vitest": "^0.29.1",
|
||||
"vue-tsc": "1.2.0",
|
||||
"zx": "^7.2.0"
|
||||
},
|
||||
"pnpm": {
|
||||
"peerDependencyRules": {
|
||||
|
|
|
@ -60,13 +60,13 @@
|
|||
"dependencies": {
|
||||
"@antfu/utils": "^0.7.2",
|
||||
"@ctrl/tinycolor": "^3.6.0",
|
||||
"@iconify-json/carbon": "^1.1.15",
|
||||
"@iconify-json/carbon": "^1.1.16",
|
||||
"@iconify-json/ri": "^1.1.5",
|
||||
"@intlify/unplugin-vue-i18n": "^0.8.2",
|
||||
"@types/body-scroll-lock": "^3.1.0",
|
||||
"@vitejs/plugin-vue": "^4.0.0",
|
||||
"@vueuse/core": "^9.13.0",
|
||||
"@vueuse/head": "^1.0.26",
|
||||
"@vueuse/head": "^1.1.9",
|
||||
"@vueuse/integrations": "^9.13.0",
|
||||
"body-scroll-lock": "4.0.0-beta.0",
|
||||
"consola": "^2.15.3",
|
||||
|
@ -101,7 +101,7 @@
|
|||
"shiki": "^0.14.1",
|
||||
"star-markdown-css": "^0.4.2",
|
||||
"unconfig": "^0.3.7",
|
||||
"unocss": "^0.50.0",
|
||||
"unocss": "^0.50.1",
|
||||
"unplugin-vue-components": "^0.24.0",
|
||||
"vite": "^4.1.4",
|
||||
"vite-plugin-pages": "^0.28.0",
|
||||
|
|
848
pnpm-lock.yaml
848
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue