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:
+16
-4
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user