dma_handbook/docs/.vuepress/config.js
2025-12-10 17:23:41 +08:00

249 lines
11 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { viteBundler } from '@vuepress/bundler-vite'
import { defaultTheme } from '@vuepress/theme-default'
import { defineUserConfig } from 'vuepress'
// import * as path from "path";
// const path = require("path");
// import {registerComponentsPlugin} from '@vuepress/plugin-register-components'
// const { registerComponentsPlugin } = require('@vuepress/plugin-register-components');
export default defineUserConfig({
// ...其他配置...
head: [
['meta', { name: 'og:type', content: 'website' }],
['meta', { property: 'og:title', content: 'DMA服务人员操作手册' }],
['meta', { name: 'description', content: 'DMA服务操作手册' }],
['meta', { property: 'og:description', content: 'DMA服务全流程操作指南' }],
['meta', { property: 'og:image', content: 'https://images.health.ufutx.com/202503/12/1f227399ffc2ddbf6c58eafa80627d19.png?v=' + Date.now() }],
// ['meta', { property: 'og:image', content: 'https://images.health.ufutx.com/202503/12/1f227399ffc2ddbf6c58eafa80627d19.png?v=' + Date.now() }],
// ['meta', { name: 'twitter:image', content: 'https://images.health.ufutx.com/202503/12/1f227399ffc2ddbf6c58eafa80627d19.png?v=' + Date.now() }],
// ['meta', { property: 'og:url', content: 'https://example.com/article' }],
['link', { rel: 'icon', href: 'https://images.health.ufutx.com/202503/12/1f227399ffc2ddbf6c58eafa80627d19.png?v=' + Date.now() }],
// ['meta', { name: 'thumbnail', content: 'https://example.com/share-image.jpg' }],
// ['meta', { name: 'WeChat-Description', content: '点击查看完整DMA服务流程' }]
],
bundler: viteBundler({
// vite bundler options here
}),
theme: defaultTheme({
// default theme options here
navbar: [
'/',
{
text: '核心操作',
link: '/posts/overview',
activeMatch: '^/posts/overview',
},
{
text: '角色文档',
children: [
{ text: '主教练', link: '/posts/chiefCoach.html' },
{ text: '副教练', link: '/posts/assistantCoach.html' },
{ text: '客服', link: '/posts/service.html' },
{ text: '健康管理师', link: '/posts/teacher.html' },
],
},
{
text: '操作指南',
children: [
{ text: '分润提现', link: '/posts/shareBenefit' },
{ text: 'APP相关', link: '/posts/appCorrelation' },
{ text: 'DMA模块', link: '/posts/DMAModule' },
{ text: '考试预约', link: '/posts/examReservation' },
{ text: '代理商', link: '/posts/agent' },
{ text: '用户服务流程', link: '/posts/userServiceProcess' },
],
},
{ text: '常见问题', link: '/posts/helpCenter' },
{ text: '更新日志', link: '/posts/changelog' },
],
sidebar: ({ pagePath }) => {
// const sidebarMap = {
// '/posts': [
// {
// title: '主教练文档',
// collapsable: true,
// children: [
//
// ] // 移除.md后缀
// }
// ],
// '/posts/archive2': [
// {
// title: '副教练文档',
// collapsable: true,
// children: ['/posts/.md']
// }
// ],
// '/posts/article1': [
// {
// title: '客服文档',
// collapsable: true,
// children: ['/posts/.md']
// }
// ]
// };
// return sidebarMap[pagePath] || [];
}
// sidebar: {
// 默认 sidebar可选用于根路径 /
// '/': [
// {text: '首页', link: '/'}
// ],
//
// // === 更新日志专属 sidebar ===
// '/posts/changelog.html': [
// {
// text: '更新日志',
// collapsible: true,
// children: [
// {
// text: '2025年11月',
// collapsible: true,
// children: [
// {
// text: '11-26 新增健康DMA人体驾照考试报名操作指南',
// link: '/posts/examReservation.html'
// },
// {text: '11-26 新增DMA价格更新', link: '/posts/DMAModule.html#六、dma价格更新'},
// {
// text: '11-18 新增:营养素使用方法快捷图片查找与发送',
// link: '/posts/DMAModule.html#二、营养素使用方法-快捷图片查找与发送'
// },
// {text: '11-18 新增:复盘评估', link: '/posts/DMAModule.html#三、复盘评估'},
// {
// text: '11-18 新增:用户方案起始日与结束日',
// link: '/posts/DMAModule.html#四、设置用户方案起始日与结束日'
// },
// {
// text: '11-18 新增:用户上传数据查看',
// link: '/posts/DMAModule.html#五、用户上传数据查看'
// },
// {
// text: '11-13 新增特殊价格购买20000及25800',
// link: '/posts/DMAModule.html#一、特殊价格购买-20000及25800'
// },
// {text: '11-06 更新APP消息通知', link: '/posts/appCorrelation.html#一、app消息通知'},
// {text: '11-06 更新DMA隐私账号相关', link: '/posts/helpCenter.html#_18-关于隐私账号'}
// ]
// },
// {
// text: '2025年10月',
// collapsible: true,
// children: [
// {text: '10-17 更新:流程节点时效汇总表调整', link: '/#附录-流程节点时效汇总表'}
// ]
// }
// ]
// }
// ],
//
// // === 主教练页面 sidebar ===
// '/posts/chiefCoach.html': [
// {
// text: '主教练文档',
// collapsible: true,
// children: [
// {text: '信息保密规范', link: '/posts/chiefCoach.html#信息保密规范'},
// // 可添加更多锚点
// ]
// }
// ],
//
// // === 副教练页面 sidebar ===
// '/posts/assistantCoach.html': [
// {
// text: '副教练文档',
// collapsible: true,
// children: [
// {text: '信息保密规范', link: '/posts/assistantCoach.html#信息保密规范'},
// {
// text: '设置用户方案起始日与结束日',
// link: '/posts/DMAModule.html#四、设置用户方案起始日与结束日'
// }
// ]
// }
// ],
//
// // === 客服页面 sidebar ===
// '/posts/service.html': [
// {
// text: '客服文档',
// collapsible: true,
// children: [
// {text: '信息保密规范', link: '/posts/service.html#信息保密规范'}
// ]
// }
// ],
//
// // === 其他 posts 页面(通用)===
// '/posts/': [
// // 如果访问 /posts/overview.html 等未单独配置的页面,
// // 可以提供一个通用 sidebar
// {
// text: '操作指南',
// collapsible: true,
// children: [
// {text: '概述', link: '/posts/overview.html'},
// {text: '分润提现', link: '/posts/shareBenefit.html'},
// {text: 'APP相关', link: '/posts/appCorrelation.html'},
// {text: 'DMA模块', link: '/posts/DMAModule.html'},
// {text: '考试预约', link: '/posts/examReservation.html'},
// {text: '代理商', link: '/posts/agent.html'},
// ]
// },
// {
// text: '角色文档',
// collapsible: true,
// children: [
// {text: '主教练', link: '/posts/chiefCoach.html'},
// {text: '副教练', link: '/posts/assistantCoach.html'},
// {text: '客服', link: '/posts/service.html'},
// {text: '健康管理师', link: '/posts/teacher.html'},
// ]
// }
// ]
// }
}),
lang:'zh-CN',
title:'DMA服务人员服务操作手册',
description: 'DMA服务人员服务操作手册',
base:'/dma_handbook/',
image:'https://images.health.ufutx.com/202503/12/1f227399ffc2ddbf6c58eafa80627d19.png',
plugins: [
['@vuepress/plugin-medium-zoom', {
selector: 'img',
delay: 500,
lazy: true,
options: {
loading: 'lazy',
decoding: 'async',
// 添加交叉观察器配置
observer: true,
observerOptions: {
rootMargin: '0px',
threshold: 0.1
}
}
}],
// registerComponentsPlugin({
// // 配置项
// componentsDir: path.resolve(__dirname, '../../', 'components'), // 自动注册全局组件,
// })
// ['@vuepress/seo', {
// siteTitle: (_, $site) => 'TypeScript中文文档',
// title: $page => $page.title+'1321321',
// description: $page => $page.frontmatter.description,
// author: (_, $site) => '冴羽',
// type: $page => 'article',
// url: (_, $site, path) => 'https://ts.yayujs.com' + path,
// image: ($page, $site) => "https://www.typescriptlang.org/icons/icon-144x144.png",
// publishedAt: $page => $page.frontmatter.date && new Date($page.frontmatter.date),
// modifiedAt: $page => $page.lastUpdated && new Date($page.lastUpdated),
// }]
]
})