chore: update docs & fix docs build

This commit is contained in:
YunYouJun 2024-01-19 20:01:36 +08:00
parent 000e9f54a8
commit 52a8ee4398
7 changed files with 518 additions and 478 deletions

View File

@ -26,7 +26,7 @@
"valaxy-theme-yun": "workspace:*"
},
"devDependencies": {
"nodemon": "^3.0.2",
"nodemon": "^3.0.3",
"vite-plugin-inspect": "^0.8.1",
"vite-plugin-pwa": "^0.17.4"
}

View File

@ -21,8 +21,8 @@
},
"devDependencies": {
"@iconify-json/simple-icons": "^1.1.88",
"nodemon": "^3.0.2",
"nodemon": "^3.0.3",
"vite": "^5.0.11",
"vitepress": "1.0.0-rc.36"
"vitepress": "1.0.0-rc.39"
}
}

View File

@ -291,7 +291,7 @@ export default config
```js [config.js]
/**
* @type {import('vitepress').UserConfig}
* @type {import('valaxy').UserConfig}
*/
const config = {
// ...
@ -301,7 +301,7 @@ export default config
```
```ts [config.ts]
import type { UserConfig } from 'vitepress'
import type { UserConfig } from 'valaxy'
const config: UserConfig = {
// ...

View File

@ -56,7 +56,7 @@
"c12": "^1.6.1"
},
"devDependencies": {
"@antfu/eslint-config": "2.6.2",
"@antfu/eslint-config": "2.6.3",
"@iconify-json/logos": "^1.1.42",
"@iconify-json/vscode-icons": "^1.1.33",
"@microsoft/api-extractor": "^7.39.1",
@ -64,12 +64,12 @@
"@types/markdown-it-attrs": "^4.1.3",
"@types/markdown-it-container": "^2.0.9",
"@types/markdown-it-emoji": "^2.0.4",
"@types/node": "^20.11.2",
"@types/node": "^20.11.5",
"@types/prompts": "^2.4.9",
"@types/resolve": "^1.20.6",
"bumpp": "^9.2.1",
"bumpp": "^9.3.0",
"cross-env": "^7.0.3",
"cypress": "^13.6.2",
"cypress": "^13.6.3",
"eslint": "^8.56.0",
"eslint-plugin-cypress": "^2.15.1",
"https-localhost": "^4.7.1",
@ -77,7 +77,7 @@
"lint-staged": "^15.2.0",
"prompts": "^2.4.2",
"rimraf": "^5.0.5",
"stylelint": "^16.1.0",
"stylelint": "^16.2.0",
"stylelint-config-recommended-vue": "^1.5.0",
"stylelint-config-standard-scss": "^13.0.0",
"tsup": "^8.0.1",
@ -93,7 +93,7 @@
"valaxy-addon-waline": "workspace:*",
"valaxy-theme-press": "workspace:*",
"valaxy-theme-yun": "workspace:*",
"vitest": "^1.2.0",
"vitest": "^1.2.1",
"vue-tsc": "1.8.27",
"zx": "^7.2.3"
},

View File

@ -4,8 +4,9 @@ import type { Plugin } from 'vite'
import { defaultThemeConfig } from './config'
import type { ThemeConfig } from './types'
function ThemeVitePlugin(options: ResolvedValaxyOptions<ThemeConfig>): Plugin {
const themeConfig = options.config.themeConfig!
function ThemeVitePlugin(_options?: ResolvedValaxyOptions<ThemeConfig>): Plugin {
// TODO:
// const themeConfig = options.config.themeConfig!
return {
name: 'valaxy-theme-press',
@ -15,7 +16,8 @@ function ThemeVitePlugin(options: ResolvedValaxyOptions<ThemeConfig>): Plugin {
css: {
preprocessorOptions: {
scss: {
additionalData: `$c-primary: ${themeConfig.colors?.primary || '#0078E7'} !default;`,
// additionalData: `$c-primary: ${themeConfig.colors?.primary || '#0078E7'} !default;`,
additionalData: `$c-primary: ${'#0078E7'} !default;`,
},
},
},
@ -28,11 +30,11 @@ function ThemeVitePlugin(options: ResolvedValaxyOptions<ThemeConfig>): Plugin {
}
}
export default defineTheme<ThemeConfig>((options) => {
export default defineTheme<ThemeConfig>((_options) => {
return {
themeConfig: defaultThemeConfig,
vite: {
plugins: [ThemeVitePlugin(options)],
plugins: [ThemeVitePlugin()],
},
}
})

View File

@ -64,18 +64,18 @@
},
"dependencies": {
"@antfu/utils": "^0.7.7",
"@ctrl/tinycolor": "^4.0.2",
"@ctrl/tinycolor": "^4.0.3",
"@fastify/deepmerge": "^1.3.0",
"@iconify-json/carbon": "^1.1.27",
"@iconify-json/ri": "^1.1.19",
"@intlify/unplugin-vue-i18n": "^2.0.0",
"@types/body-scroll-lock": "^3.1.2",
"@types/katex": "^0.16.7",
"@unhead/addons": "^1.8.9",
"@unhead/schema-org": "^1.8.9",
"@unhead/vue": "^1.8.9",
"@unhead/addons": "^1.8.10",
"@unhead/schema-org": "^1.8.10",
"@unhead/vue": "^1.8.10",
"@vitejs/plugin-vue": "^5.0.3",
"@vue/devtools-api": "^7.0.10",
"@vue/devtools-api": "^7.0.11",
"@vueuse/core": "^10.7.2",
"@vueuse/integrations": "^10.7.2",
"body-scroll-lock": "4.0.0-beta.0",
@ -112,7 +112,7 @@
"pascalcase": "^2.0.0",
"pinia": "^2.1.7",
"qrcode": "^1.5.3",
"sass": "^1.69.7",
"sass": "^1.70.0",
"shiki": "^0.14.7",
"star-markdown-css": "^0.4.2",
"unconfig": "^0.3.11",
@ -121,11 +121,11 @@
"unplugin-vue-router": "^0.7.0",
"vanilla-lazyload": "^17.8.5",
"vite": "^5.0.11",
"vite-plugin-vue-devtools": "^7.0.10",
"vite-plugin-vue-devtools": "^7.0.11",
"vite-plugin-vue-layouts": "0.11.0",
"vite-ssg": "0.23.6",
"vite-ssg-sitemap": "0.6.1",
"vue": "^3.4.14",
"vue": "^3.4.15",
"vue-i18n": "^9.9.0",
"vue-router": "^4.2.5",
"yargs": "^17.7.2"

File diff suppressed because it is too large Load Diff