64 lines
1.6 KiB
TypeScript
64 lines
1.6 KiB
TypeScript
import { defineConfig } from 'vitepress'
|
|
|
|
import { getSidebar } from 'vitepress-plugin-auto-sidebar'
|
|
|
|
// https://vitepress.dev/reference/site-config
|
|
export default defineConfig({
|
|
base: process.env.NODE_ENV === 'development' ? '/' : '/demo/devstandard/',
|
|
// base: '/demo/devstandard/',
|
|
markdown: {
|
|
config: (md) => {
|
|
const render = md.render
|
|
md.render = function (src, env) {
|
|
return `<div v-pre>${render.call(this, src, env)}</div>`
|
|
}
|
|
},
|
|
html: false,
|
|
attrs: {
|
|
disable: true
|
|
},
|
|
},
|
|
title: 'webDevStandard',
|
|
description: '前端开发规范',
|
|
themeConfig: {
|
|
// https://vitepress.dev/reference/default-theme-config
|
|
socialLinks: [{ icon: 'github', link: 'https://git.081024.xyz/hxx/devStandard' }],
|
|
search: {
|
|
provider: 'local'
|
|
},
|
|
outlineTitle: '页面导航',
|
|
docFooter: {
|
|
prev:"上一页",
|
|
next:"下一页",
|
|
},
|
|
outline: {level: [2,6]},
|
|
|
|
nav: [
|
|
{ text: '首页', link: '/' },
|
|
{ text: '开发规范', link: '/devStandard/前端/1-目录' },
|
|
{ text: '面试复习', link: '/learning/1-html/1-html基础' },
|
|
],
|
|
|
|
sidebar: {
|
|
'/devStandard': getSidebar({
|
|
contentRoot: '/docs',
|
|
contentDirs: ['devStandard'],
|
|
collapsible: true,
|
|
collapsed: true,
|
|
}),
|
|
'/learning': getSidebar({
|
|
contentRoot: '/docs',
|
|
contentDirs: ['learning'],
|
|
collapsible: true,
|
|
collapsed: true
|
|
}),
|
|
},
|
|
},
|
|
outDir: "../dist",
|
|
vite: {
|
|
assetsInclude: ['**/*.jpg', '**/*.png', '**/*.gif', '**/*.zip', '**/*.pdf','**/*.webp'],
|
|
plugins: []
|
|
},
|
|
ignoreDeadLinks: true,
|
|
})
|