2021-04-17 21:33:21 +08:00
|
|
|
import { defineConfig } from 'dumi';
|
|
|
|
|
2021-10-29 13:04:44 +08:00
|
|
|
const baseUrl = `http://localhost:${process.env.API_PORT || '13001'}/`;
|
|
|
|
console.log('baseUrl', baseUrl);
|
2021-07-24 16:37:13 +08:00
|
|
|
|
2021-10-31 09:44:52 +08:00
|
|
|
process.env.MFSU_AD = 'none';
|
|
|
|
|
2021-04-17 21:33:21 +08:00
|
|
|
export default defineConfig({
|
|
|
|
title: ' ',
|
|
|
|
hash: true,
|
2021-07-23 18:26:05 +08:00
|
|
|
define: {
|
2021-10-29 13:04:44 +08:00
|
|
|
'process.env.API_URL': process.env.API_URL || `${baseUrl}api/`,
|
2021-10-01 23:31:49 +08:00
|
|
|
'process.env.API_HOSTNAME': process.env.API_HOSTNAME,
|
2021-07-23 18:26:05 +08:00
|
|
|
},
|
2021-09-30 15:16:41 +08:00
|
|
|
proxy: {
|
2021-10-29 08:35:01 +08:00
|
|
|
'/api/': {
|
2021-10-29 13:04:44 +08:00
|
|
|
target: baseUrl,
|
|
|
|
changeOrigin: true,
|
|
|
|
pathRewrite: { '^/api/': '/api/' },
|
2021-09-30 15:16:41 +08:00
|
|
|
},
|
|
|
|
},
|
2021-10-28 22:55:51 +08:00
|
|
|
resolve: {
|
2021-10-31 11:35:11 +08:00
|
|
|
includes: ['docs', 'packages/client/src/schemas'],
|
2021-10-28 22:55:51 +08:00
|
|
|
},
|
|
|
|
styles: [
|
|
|
|
`
|
|
|
|
.__dumi-default-navbar-logo {
|
|
|
|
height: 100%;
|
|
|
|
width: 100px;
|
|
|
|
}
|
|
|
|
.__dumi-default-layout .__dumi-default-navbar {
|
|
|
|
box-shadow: 0 0 3px rgb(60 72 88 / 15%);
|
|
|
|
}
|
|
|
|
.__dumi-default-layout[data-site-mode='true'] {
|
|
|
|
padding-top: 150px !important;
|
|
|
|
}
|
|
|
|
@media only screen and (max-width: 767px) {
|
|
|
|
.__dumi-default-layout[data-site-mode="true"] {
|
|
|
|
padding-top: 128px !important;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@media only screen and (min-width: 768px) {
|
|
|
|
.__dumi-default-menu[data-mode='site'] {
|
|
|
|
top: 100px !important;
|
|
|
|
}
|
|
|
|
.__dumi-default-layout[data-site-mode='true'] .__dumi-default-layout-toc {
|
|
|
|
top: 150px !important;
|
|
|
|
}
|
|
|
|
}
|
2021-10-31 09:44:52 +08:00
|
|
|
video {
|
|
|
|
max-width: 800px;
|
|
|
|
width: 100%;
|
|
|
|
border-radius: 5px;
|
|
|
|
box-shadow: 0 8px 24px -2px rgb(0 0 0 / 5%);
|
|
|
|
}
|
2021-10-29 13:04:44 +08:00
|
|
|
`,
|
2021-10-28 22:55:51 +08:00
|
|
|
],
|
2021-08-16 12:36:17 +08:00
|
|
|
// mfsu: {},
|
2021-05-23 08:38:08 +08:00
|
|
|
// ssr: {},
|
|
|
|
// exportStatic: {},
|
2021-10-28 22:55:51 +08:00
|
|
|
mode: 'site',
|
|
|
|
logo: 'https://www.nocobase.com/images/logo.png',
|
2021-04-17 21:33:21 +08:00
|
|
|
navs: {
|
|
|
|
'en-US': [
|
|
|
|
null,
|
|
|
|
{ title: 'GitHub', path: 'https://github.com/nocobase/nocobase' },
|
2021-10-28 22:55:51 +08:00
|
|
|
// { title: 'Changelog', path: 'https://github.com/nocobase/nocobase/releases' },
|
2021-04-17 21:33:21 +08:00
|
|
|
],
|
|
|
|
'zh-CN': [
|
|
|
|
null,
|
|
|
|
{ title: 'GitHub', path: 'https://github.com/nocobase/nocobase' },
|
2021-10-28 22:55:51 +08:00
|
|
|
// { title: '更新日志', path: 'https://github.com/nocobase/nocobase/releases' },
|
2021-04-17 21:33:21 +08:00
|
|
|
],
|
|
|
|
},
|
|
|
|
// more config: https://d.umijs.org/config
|
|
|
|
});
|