2026-05-31 19:08:20 +08:00
|
|
|
import { defineConfig } from 'dumi'
|
2026-05-31 09:36:07 +08:00
|
|
|
import { resolve } from 'path'
|
|
|
|
|
|
|
|
|
|
export default defineConfig({
|
2026-05-31 19:17:21 +08:00
|
|
|
// host: '0.0.0.0',
|
|
|
|
|
// port: 8000,
|
2026-05-31 21:26:47 +08:00
|
|
|
scripts: [
|
|
|
|
|
`if (location.pathname === '/' || location.pathname === '') { location.replace('/guide/introduce'); }`,
|
|
|
|
|
],
|
2026-05-31 09:36:07 +08:00
|
|
|
themeConfig: {
|
2026-05-31 18:34:36 +08:00
|
|
|
name: 'RustUI',
|
2026-05-31 09:36:07 +08:00
|
|
|
logo: false,
|
|
|
|
|
nav: [
|
|
|
|
|
{ title: '指南', link: '/guide' },
|
|
|
|
|
{ title: '组件', link: '/components' },
|
|
|
|
|
],
|
|
|
|
|
socialLinks: {
|
2026-05-31 18:34:36 +08:00
|
|
|
github: 'https://github.com/donghym/RustUI',
|
2026-05-31 09:36:07 +08:00
|
|
|
},
|
2026-05-31 09:36:23 +08:00
|
|
|
sidebarGroupModePath: true,
|
2026-05-31 09:36:07 +08:00
|
|
|
},
|
|
|
|
|
apiParser: {},
|
|
|
|
|
resolve: {
|
|
|
|
|
docDirs: ['docs'],
|
|
|
|
|
entryFile: './src/index.ts',
|
|
|
|
|
atomDirs: [
|
2026-05-31 09:36:23 +08:00
|
|
|
{ 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' },
|
2026-05-31 18:34:36 +08:00
|
|
|
{ type: 'component', dir: 'src/components/feedback' },
|
2026-05-31 09:36:07 +08:00
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
alias: {
|
2026-05-31 18:34:36 +08:00
|
|
|
'RustUI': resolve(__dirname, 'src'),
|
2026-05-31 09:36:07 +08:00
|
|
|
},
|
|
|
|
|
outputPath: 'dist-docs',
|
|
|
|
|
})
|