统一图片路径前缀

This commit is contained in:
chenjinyang
2026-02-11 17:03:28 +08:00
parent cd24fe007f
commit 2576f62f88
3 changed files with 33 additions and 62 deletions

View File

@@ -1,5 +1,6 @@
const baiduCode = require('./config/baiduCode.js'); // 百度统计hm码
const htmlModules = require('./config/htmlModules.js');
const path = require('path');
module.exports = {
@@ -9,7 +10,7 @@ module.exports = {
title: "vuepress-theme-vdoing",
description: '一个基于VuePress的 知识管理&博客 主题',
// base: '/', // 默认'/'。如果你想将你的网站部署到如 https://foo.github.io/bar/,那么 base 应该被设置成 "/bar/",(否则页面将失去样式等文件)
base: '/help-center/vuepress-theme-vdoing-doc/docs/.vuepress/dist/',
base: '/',
theme: 'vdoing',
title: "经创HIS系统操作手册",
head: [ // 注入到页面<head> 中的标签,格式[tagName, { attrName: attrValue }, innerHTML?]
@@ -27,48 +28,18 @@ module.exports = {
],
// 注意patterns 配置只影响 Markdown 文件,不影响 public 目录中的静态资源
configureWebpack: {
resolve: {
alias: {
'@img': path.resolve(__dirname, './public/img')
}
}
},
// 主题配置
themeConfig: {
nav: [
// { text: '首页', link: '/' },
// {
// text: '指南', link: '/pages/a2f161/', items: [
// { text: '主题初衷与诞生', link: '/pages/52d5c3/' },
// { text: '介绍', link: '/pages/a2f161/' },
// { text: '快速上手', link: '/pages/793dcb/' },
// { text: '目录结构', link: '/pages/2f674a/' },
// { text: '核心配置和约定', link: '/pages/33d574/' },
// { text: '自动生成front matter', link: '/pages/088c16/' },
// { text: 'Markdown 容器', link: '/pages/d0d7eb/' },
// { text: 'Markdown 中使用组件', link: '/pages/197691/' },
// {
// text: '相关文章', items: [
// { text: '使目录栏支持h2~h6标题', link: '/pages/8dfab5/' },
// { text: '如何让你的笔记更有表现力', link: '/pages/dd027d/' },
// { text: '批量操作front matter工具', link: '/pages/2b8e22/' },
// { text: '部署', link: '/pages/0fc1d2/' },
// { text: '关于写文章和H1标题', link: '/pages/9ae0bd/' },
// { text: '关于博客搭建与管理', link: '/pages/26997d/' },
// { text: '在线编辑和新增文章的方法', link: '/pages/c5a54d/' },
// ]
// }
// ]
// },
// {
// text: '配置', link: '/pages/a20ce8/', items: [
// { text: '主题配置', link: '/pages/a20ce8/' },
// { text: '首页配置', link: '/pages/f14bdb/' },
// { text: 'front matter配置', link: '/pages/3216b0/' },
// { text: '目录页配置', link: '/pages/54651a/' },
// { text: '添加摘要', link: '/pages/1cc523/' },
// { text: '修改主题颜色和样式', link: '/pages/f51918/' },
// { text: '评论栏', link: '/pages/ce175c/' },
// ]
// },
// { text: '资源', link: '/pages/db78e2/' },
// { text: '案例', link: '/pages/5d571c/' },
// { text: '问答', link: '/pages/9cc27d/' },
// { text: '赞助', link: '/pages/1b12ed/' },
{ text: '首页', link: '/' },
{ text: 'HIS', link: '/pages/520e67/' },
],
sidebarDepth: 2, // 侧边栏显示深度默认1最大2显示到h3标题