Open matthew-carroll opened 11 months ago
@matthew-carroll any guide to make it as actual path?
@hifiaz is this something you need? If so, can you please provide details about what you're trying to do, what's working, and what isn't working?
i try your great work on this repo https://github.com/hifiaz/lthfi
but i think because this not in main so assets css, image, and default path for '/' routing to https://hifiaz.github.io
actually correct path is https://hifiaz.github.io/lthfi/
@hifiaz I think I'm going to need some specifics. Please choose 1 broken image path and post:
https://hifiaz.github.io/lthfi/images/nav-search.png
but got https://hifiaz.github.io/images/nav-search.png
https://hifiaz.github.io/lthfi/about
=>> https://hifiaz.github.io/about
https://hifiaz.github.io/lthfi/css/main.css
=>> https://hifiaz.github.io/css/main.css
Thanks. I'll ship a fix for this soon.
@hifiaz - I looked into this a little bit more. I think this might be more of a user issue rather than a static_shock issue.
Can you please check your HTML files and remove the leading "/" from the paths?
For example, change "/images/nav-search.png" to "images/nav-search.png".
This changes from an "absolute" path to a "relative" path. By using relative paths, GitHub pages should be able to resolve them correctly.
when i set "images/nav-search.png" its work on root build but not work when sub like https://hifiaz.github.io/lthfi/about/
also css not rendered on sub
navigation url from _data.yaml keep redirect to main https://hifiaz.github.io/
actually must be https://hifiaz.github.io/lthfi
so from this case only index.html on main root build folder working correctly
When deploying Static Shock to GitHub pages, we ended up with a root URL of
https://flutter-bounty-hunters.github.io/static_shock/
This means that when we expect an asset path of
/styles/theme.css
, the actual path is/static_shock/styles/theme.css
. Therefore, assets fail to load.Static Shock should make it possible to account for a global base-path in the URL for all pages and assets.