123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- import {defineConfig} from 'vitepress';
- import {applyPlugins} from '@ruabick/md-demo-plugins';
- import {genTemp} from '@ruabick/vite-plugin-gen-temp';
- import {genApiDoc} from '@ruabick/vite-plugin-gen-api-doc';
- import {chineseSearchOptimize, pagefindPlugin} from 'vitepress-plugin-pagefind'
- import {sidebar} from './sidebar.js';
- import {resolve} from 'path';
- export default defineConfig({
- lang: 'zh-CN',
- lastUpdated: true,
- title: "hc-vue3-ui",
- themeConfig: {
- logo: '/favicon.ico',
- outlineTitle: '此页的大纲',
- nav: [
- {
- text: '使用说明',
- link: '/guide/index'
- },
- {
- text: '组件库',
- link: '/components/app-config/index'
- },
- {
- text: '方法函数',
- link: '/guide/index'
- },
- {
- text: '资料导航',
- link: '/guide/index'
- },
- {
- text: '1.0.0',
- items: [
- {
- text: '更新日志',
- link: '/CHANGELOG.md'
- }
- ]
- }
- ],
- sidebar,
- },
- vue: {},
- vite: {
- plugins: [
- genTemp(), genApiDoc(),
- pagefindPlugin({
- btnPlaceholder: '搜索',
- placeholder: '搜索文档',
- emptyText: '空空如也',
- heading: '共: {{searchResult}} 条结果',
- customSearchQuery: chineseSearchOptimize
- })
- ],
- resolve: {
- alias: {
- 'docs': resolve('./src/'),
- },
- },
- server: {
- port: 3300,
- }
- },
- markdown: {
- config: (md) => {
- applyPlugins(md);
- },
- theme: {
- light: 'github-light',
- dark: 'github-dark',
- },
- },
- buildEnd() {
- process.exit(0);
- },
- });
|