我有两个netlify应用程序,它们构建了两个不同的静态应用程序,
一个是使用react-router的create-react-app,另一个是docusaurus静态应用。
总而言之:
myapp.com/login # React App
myapp.com/profile # React App
myapp.com/docs # Redirect to docusaurus netlify app
myapp.com/docs/getting-started # docusaurus app with its own router
react应用netlify.toml
如下
[[redirects]]
from = "/docs"
to = "https://docusaurus-website.netlify.com"
status = 200
# Redirect to / so react-router works.
[[redirects]]
from = "/*"
to = "/"
status = 200
我想将我的docusaurus网站托管在mysite.com/docs
上,但是当我将baseUrl设置为/docs
时,我的站点已呈现,但是资产没有加载,并且docusaurus路由器无法工作。
我是最好的方法吗?