Open DioxusGrow opened 3 months ago
I've had no end to issues trying to set a base path. Nothing works the way I would expect it to (web and fullstack) and workarounds have been giving strange errors. I'm going to create a post in Discord to try and get some assistance as well.
For reference, I've been using the most up-to-date tools for Dioxus and tools at 0.5.1 and rustc 1.77.1 on Windows 10 and my Ubuntu 20.04.6 LTS web server.
Problem
At the moment, routing faces significant issues when the site is located in a subdirectory, as on GitHub Pages. For example, consider the site at https://dioxusgrow.github.io/crabsburger/.
Steps To Reproduce
Steps to reproduce the behavior:
Cargo.toml
The Dioxus.toml file needs to specify the following settings:
The Route is used with the following settings:
When navigating to https://dioxusgrow.github.io/crabsburger/, it will redirect to https://dioxusgrow.github.io/. To ensure the CSS files work correctly, you must specify in the Dioxus.toml file:
Additionally, each image must include the subfolder name of the site for proper display, like so:
src: "crabsburger/images/home-image.png",
Expected behavior
However, if you reload the main domain https://dioxusgrow.github.io/, the route will no longer work, resulting in a 404 error from GitHub itself. Manganis cannot handle subdirectories at all, making it impossible to use if the site is located in a subdirectory of the main domain.
Therefore, if test sites are located in GitHub’s subdirectories, you should either create single-page applications without routing or use other platforms, such as Netlify, which uses subdomains for test deployments, or connect existing root domain addresses.
Screenshots
If applicable, add screenshots to help explain your problem.
Environment:
web
]