I currently have a very basic Docusaurus application. I can see this is running as a ‘single page application’ – however, each route is rendering an index.html
file under it. For example /
default route is actually just rendering /index.html
and /about
route is loading /about/index.html
(despite the URL not showing it)
I am currently trying to deploy this application inside an existing single page application i have running on a server. Unfortunately, the service doesn’t allow multiple web apps running (its a linux web app running on Azure).
Question is, can i get Docusaurus to build with basic route (i.e turn off single page app) and just have everything work with direct links to the index.html page?
Or, is there any sort of workaround i could do whereby i inject a script into the entire app that simply appends the text /index.html
to the URL if its not already there? (and doesn’t cause the UI to reload)
My issue is, someone can go to the app via https://somedomain.com/docs/index.html – then they click around and the url now changes to https://somedomain.com/docs/about – if they saved this to favourites or refreshed the page, the domain throws an error because this route isn’t valid. Therefore if it could simply just save or work as https://somedomain.com/docs/about/index.html – all my problems would be solved. Any advice much appriciated