Skip to content

Commit 1d48dac

Browse files
authored
fix(docs): base url 404 (#403)
1 parent 0afc47d commit 1d48dac

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

.umirc.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ export default defineConfig({
44
mode: 'site',
55
title: '\b',
66
base: '/',
7-
publicPath: process.env.NODE_ENV === 'production' ? '/echarts-for-react/' : '/',
87
exportStatic: {},
8+
publicPath: process.env.NODE_ENV === 'production' ? '/echarts-for-react/' : '/',
9+
base: process.env.NODE_ENV === 'production' ? '/echarts-for-react/' : '/',
910
logo: 'https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/images/logo.png?_v_=20200710_1',
1011
styles: [
1112
'.__dumi-default-navbar-logo:not([data-plaintext]) { padding-left: 200px!important; }',
@@ -14,6 +15,7 @@ export default defineConfig({
1415
],
1516
navs: [
1617
null,
18+
{ title: 'G2Plot', path: 'https://github.com/antvis/G2Plot' },
1719
{ title: '在线文档', path: 'https://github.com/hustcc/echarts-for-react' },
1820
{ title: 'GitHub', path: 'https://github.com/hustcc/echarts-for-react' },
1921
],

docs/index.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@ hero:
55
title: ECharts for React
66
desc: 全网最好用的 ECharts 的 React 组件封装
77
actions:
8-
- text: 查看在线 DEMO
8+
- text: 在线实例
99
link: /examples/dynamic
10+
- text: 开源地址
11+
link: https://github.com/hustcc/echarts-for-react
1012
footer: Open-source MIT Licensed | Copyright © 2021-present
1113
---
1214

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111
"src"
1212
],
1313
"scripts": {
14-
"docs:dev": "dumi dev",
15-
"docs:build": "dumi build",
14+
"docs:dev": "NODE_ENV=development dumi dev",
15+
"docs:build": "NODE_ENV=production dumi build",
1616
"docs:deploy": "rimraf dist && npm run docs:build && gh-pages -d dist",
17-
"start": "webpack-dev-server --watch",
17+
"start": "npm run docs:dev",
1818
"lint": "eslint src __tests__ && prettier src __tests__ --check",
1919
"fix": "eslint src __tests__ --fix && prettier src __tests__ --write",
2020
"clean": "rimraf lib esm dist",

0 commit comments

Comments
 (0)