From dfe89c7507ba3293b0ca7dc4e95b65c8c2392752 Mon Sep 17 00:00:00 2001 From: afc163 Date: Wed, 13 Nov 2019 17:00:33 +0800 Subject: [PATCH] support redirect old urls --- gatsby-config.js | 26 ++++++++++++++++++++++++++ package.json | 2 +- 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/gatsby-config.js b/gatsby-config.js index bfa32c75a..f36d76a3b 100644 --- a/gatsby-config.js +++ b/gatsby-config.js @@ -23,5 +23,31 @@ module.exports = { }, ], docs: [], + // https://github.com/antvis/antvis.github.io/issues/18#issuecomment-552097061 + /* + /zh-cn/g2/3.x/demo/index.html + /zh-cn/g2/3.x/demo/xxx/xxx.html + /zh-cn/g6/3.x/index.html + /zh-cn/g6/3.x/demo/index.html + /zh-cn/g6/3.x/demo/xxx/xxx.html + /zh-cn/f2/3.x/index.html + /zh-cn/f2/3.x/demo/index.html + /zh-cn/f2/3.x/demo/xxx/xxx.html + /zh-cn/l7/1.x/index.html + /zh-cn/l7/1.x/demo/index.html + /zh-cn/l7/1.x/demo/xxx/xxx.html + /zh-cn/vis/index.html + */ + redirects: [ + { + from: '/zh-cn/index\\.html', + }, + { + from: '/zh-cn/(g2|g6|f2|l7)/[0-9]\\.x', + }, + { + from: '/zh-cn/vis/index\\.html', + }, + ], }, }; diff --git a/package.json b/package.json index 10a9dd046..ce44004a7 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "url": "https://github.com/antvis/antvis.github.io/issues" }, "dependencies": { - "@antv/gatsby-theme-antv": "^0.9.4", + "@antv/gatsby-theme-antv": "^0.9.47", "@types/react": "^16.9.5", "@types/react-dom": "^16.9.1", "antd": "^3.23.6",