feat(vuepress): 配置vite打包器及本地搜索功能

- 使用 viteBundler 配置 Vite,添加 SCSS 预处理器选项
- 启用主题的本地搜索功能以提升用户体验
- 更新 devDependencies,新增 @vuepress/plugin-search 并升级 sass-embedded 版本
- 优化导航栏样式,调整 .vp-navbar .auto-link 相关 CSS
- 重构 Java SDKMAN 和 Maven 版本管理文档,完善指令说明和操作步骤
- 修改 sidebar 配置,增加根路径禁用侧边栏显示
This commit is contained in:
2026-03-06 02:07:36 +08:00
parent 83dc5bf7c6
commit 86c8d8c512
6 changed files with 66 additions and 16 deletions
+16 -4
View File
@@ -1,11 +1,11 @@
import { defineUserConfig } from "vuepress";
import { getDirname, path } from "vuepress/utils";
import {defineUserConfig} from "vuepress";
import {viteBundler} from "@vuepress/bundler-vite";
import {getDirname, path} from "vuepress/utils";
import theme from "./theme.js";
const __dirname = getDirname(import.meta.url);
import theme from "./theme.js";
export default defineUserConfig({
base: "/",
@@ -13,6 +13,18 @@ export default defineUserConfig({
title: "氓氓小栈",
description: "氓氓小栈",
theme,
bundler: viteBundler({
viteOptions: {
css: {
preprocessorOptions: {
scss: {
quietDeps: true,
silenceDeprecations: ["if-function"],
},
},
},
},
}),
alias: {
"@theme-hope/modules/blog/components/BlogHero": path.resolve(
__dirname,