From 1d48dacd3f4193b7d579cf888d5435542bd9b83b Mon Sep 17 00:00:00 2001 From: hustcc Date: Sun, 7 Feb 2021 19:30:41 +0800 Subject: [PATCH] fix(docs): base url 404 (#403) --- .umirc.js | 4 +++- docs/index.md | 4 +++- package.json | 6 +++--- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.umirc.js b/.umirc.js index d1dda6b..5e3becb 100644 --- a/.umirc.js +++ b/.umirc.js @@ -4,8 +4,9 @@ export default defineConfig({ mode: 'site', title: '\b', base: '/', - publicPath: process.env.NODE_ENV === 'production' ? '/echarts-for-react/' : '/', exportStatic: {}, + publicPath: process.env.NODE_ENV === 'production' ? '/echarts-for-react/' : '/', + base: process.env.NODE_ENV === 'production' ? '/echarts-for-react/' : '/', logo: 'https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/logo.png?_v_=20200710_1', styles: [ '.__dumi-default-navbar-logo:not([data-plaintext]) { padding-left: 200px!important; }', @@ -14,6 +15,7 @@ export default defineConfig({ ], navs: [ null, + { title: 'G2Plot', path: 'https://github.com/antvis/G2Plot' }, { title: '在线文档', path: 'https://github.com/hustcc/echarts-for-react' }, { title: 'GitHub', path: 'https://github.com/hustcc/echarts-for-react' }, ], diff --git a/docs/index.md b/docs/index.md index debeb7d..7bf41c6 100644 --- a/docs/index.md +++ b/docs/index.md @@ -5,8 +5,10 @@ hero: title: ECharts for React desc: 全网最好用的 ECharts 的 React 组件封装 actions: - - text: 查看在线 DEMO + - text: 在线实例 link: /examples/dynamic + - text: 开源地址 + link: https://github.com/hustcc/echarts-for-react footer: Open-source MIT Licensed | Copyright © 2021-present --- diff --git a/package.json b/package.json index 74a275c..1ff9355 100644 --- a/package.json +++ b/package.json @@ -11,10 +11,10 @@ "src" ], "scripts": { - "docs:dev": "dumi dev", - "docs:build": "dumi build", + "docs:dev": "NODE_ENV=development dumi dev", + "docs:build": "NODE_ENV=production dumi build", "docs:deploy": "rimraf dist && npm run docs:build && gh-pages -d dist", - "start": "webpack-dev-server --watch", + "start": "npm run docs:dev", "lint": "eslint src __tests__ && prettier src __tests__ --check", "fix": "eslint src __tests__ --fix && prettier src __tests__ --write", "clean": "rimraf lib esm dist",