'Yew application unable to access static files when hosted in GitHub pages
I have this website I'm planning to host in GitHub pages. The URL for the home page contains the name of the repository https://s1n7ax.github.io/my-website/
. Static files linked in the HTML is trying to access them in https://s1n7ax.github.io
base but the base should be https://s1n7ax.github.io/my-website/
. How to configure this in a way that works both local and GitHub pages?
Solution 1:[1]
Following adds the /my-website base to all the static file links.
trunk serve --public-url /my-website
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | s1n7ax |