Files
RustUI/.dumirc.ts
T
2026-06-01 17:26:14 +08:00

42 lines
1.1 KiB
TypeScript

import { defineConfig } from 'dumi'
import { resolve } from 'path'
export default defineConfig({
// host: '0.0.0.0',
// port: 8000,
base: '/ui/',
publicPath: '/ui/',
scripts: [
`if (location.pathname === '/ui/' || location.pathname === '/ui') { location.replace('/ui/guide/introduce'); }`,
],
themeConfig: {
name: 'RustUI',
logo: false,
nav: [
{ title: '指南', link: '/guide' },
{ title: '组件', link: '/components' },
],
socialLinks: {
github: 'https://github.com/donghym/RustUI',
},
sidebarGroupModePath: true,
},
apiParser: {},
resolve: {
docDirs: ['docs'],
entryFile: './src/index.ts',
atomDirs: [
{ type: 'component', dir: 'src/components/common' },
{ type: 'component', dir: 'src/components/layout' },
{ type: 'component', dir: 'src/components/nav' },
{ type: 'component', dir: 'src/components/entry' },
{ type: 'component', dir: 'src/components/display' },
{ type: 'component', dir: 'src/components/feedback' },
],
},
alias: {
'RustUI': resolve(__dirname, 'src'),
},
outputPath: 'dist-docs',
})