fix(vitepress): bump vitepress-sidebar to fix generation issues (#303)

Signed-off-by: Neko Ayaka <neko@ayaka.moe>
pull/302/head^2
Neko Ayaka 2024-04-11 20:50:42 +08:00 committed by GitHub
parent ca1b91a1ff
commit f735349638
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 447 additions and 278 deletions

9
.editorconfig 100644
View File

@ -0,0 +1,9 @@
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

32
.vscode/settings.json vendored 100644
View File

@ -0,0 +1,32 @@
{
"cSpell.words": [
"antfu",
"astro",
"Attributify",
"iconify",
"katex",
"pangu",
"pjts"
],
"editor.formatOnSave": false,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit",
"source.organizeImports": "never"
},
// Enable the ESlint flat config support
"eslint.experimental.useFlatConfig": true,
// The following is optional.
// It's better to put under project setting `.vscode/settings.json`
// to avoid conflicts with working with different eslint configs
// that does not support all formats.
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact",
"vue",
"html",
"json",
"jsonc",
]
}

View File

@ -13,5 +13,9 @@ declare module 'vue' {
CopyrightInfo: typeof import('./theme/components/CopyrightInfo.vue')['default']
HomeContent: typeof import('./theme/components/HomeContent.vue')['default']
PageInfo: typeof import('./theme/components/PageInfo.vue')['default']
RouterLink: typeof import('vue-router')['RouterLink']
RouterView: typeof import('vue-router')['RouterView']
Starport: typeof import('vue-starport')['Starport']
StarportCarrier: typeof import('vue-starport')['StarportCarrier']
}
}

View File

@ -1,5 +1,5 @@
import { type DefaultTheme } from 'vitepress'
import { SidebarItem, SidebarMultiItem, generateSidebar } from 'vitepress-sidebar'
import type Options from 'vitepress-sidebar'
export const sidebar = generate()
@ -9,7 +9,8 @@ function generate() {
useFolderTitleFromIndexFile: true,
useFolderLinkFromIndexFile: true,
excludeFilesByFrontmatter: true,
}
collapsed: true,
} satisfies Partial<Options>
let sidebar = generateSidebar([
// 大学指南

View File

@ -1,20 +1,18 @@
{
"name": "rle-wiki",
"version": "1.0.0",
"description": "RLE指北",
"license": "CC-BY-SA-4.0",
"type": "module",
"version": "1.0.0",
"description": "RLE 指北",
"license": "CC-BY-SA-4.0",
"scripts": {
"dev": "vitepress dev docs",
"dev:wrangler": "wrangler pages dev ./docs/.vitepress/dist/",
"build": "vitepress build docs",
"preview": "vitepress preview docs",
"build:old": "vuepress build docs",
"clean-dev:old": "vuepress dev docs --clean-cache",
"dev:old": "vuepress dev docs",
"update-package": "pnpm dlx vp-update"
},
"devDependencies": {
"@antfu/eslint-config": "^2.12.2",
"@cloudflare/workers-types": "^4.20240222.0",
"@iconify-json/octicon": "^1.1.52",
"@nolebase/vitepress-plugin-enhanced-readabilities": "^1.22.2",
@ -23,6 +21,9 @@
"@project-trans/suggestion-box": "^0.0.9",
"@types/markdown-it": "^13.0.7",
"@types/markdown-it-footnote": "^3.0.3",
"@unocss/eslint-plugin": "^0.59.0",
"eslint": "^8.57.0",
"eslint-plugin-format": "^0.1.0",
"markdown-it-footnote": "^3.0.3",
"markdown-it-katex": "^2.0.3",
"markdown-it-pangu": "^1.0.2",
@ -32,17 +33,13 @@
"unplugin-vue-components": "^0.26.0",
"vite": "^5.1.3",
"vitepress": "1.0.0-rc.42",
"vitepress-sidebar": "^1.19.0",
"vitepress-sidebar": "^1.22.0",
"vue": "^3.4.19",
"wrangler": "^3.32.0",
"@antfu/eslint-config": "^2.12.2",
"eslint": "^9.0.0",
"eslint-plugin-format": "^0.1.0",
"@unocss/eslint-plugin": "^0.59.0"
"wrangler": "^3.32.0"
},
"pnpm": {
"overrides": {
"hasown": "npm:@nolyfill/hasown@latest"
}
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -1,23 +1,23 @@
{
"compilerOptions": {
"target": "ESNext", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
"target": "ESNext", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
"lib": [
"DOM",
"DOM.Iterable",
"ESNext"
],
"module": "ESNext", /* Specify what module code is generated. */
"moduleResolution": "Bundler",
"esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */
"forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
"strict": true, /* Enable all strict type-checking options. */
"skipLibCheck": true /* Skip type checking all .d.ts files. */
"module": "ESNext", /* Specify what module code is generated. */
"moduleResolution": "Bundler", /* Ensure that casing is correct in imports. */
"strict": true,
"esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */
"forceConsistentCasingInFileNames": true, /* Enable all strict type-checking options. */
"skipLibCheck": true /* Skip type checking all .d.ts files. */
},
"include": [
"docs/*.d.ts",
"docs/*.ts",
"docs/.vitepress/**/*.d.ts",
"docs/.vitepress/**/*.ts",
"docs/.vitepress/**/*.vue",
"docs/.vitepress/**/*.vue"
]
}