Closed afc163 closed 4 years ago
修复点击子产品链接都是 404 的问题,这个问题只发生在首页。
原因是 gatsby 都是 reach-router 的前端路由,子站点由于有 pathPrefix 隔离,路由信息互不包含,而首页里是 / 开头,子站点路径都会进入首页的 404。
/
现在在这里加一段比较恶心的全局链接点击拦截来解决,对于手动 navigate 的跳转方式无效。希望后面能找到更优雅的方案。
Deploy preview for hardcore-feynman-614fe6 ready!
Built with commit a628e80f288454c61489faaf0d8757c275aeaea2
https://deploy-preview-39--hardcore-feynman-614fe6.netlify.com
还有问题。
修复点击子产品链接都是 404 的问题,这个问题只发生在首页。
原因是 gatsby 都是 reach-router 的前端路由,子站点由于有 pathPrefix 隔离,路由信息互不包含,而首页里是
/
开头,子站点路径都会进入首页的 404。现在在这里加一段比较恶心的全局链接点击拦截来解决,对于手动 navigate 的跳转方式无效。希望后面能找到更优雅的方案。