Static Site with Github Pages basepath issue
Answered
Cinnamon posted this in #help-forum
CinnamonOP
Hi, I'm about finished with a site that we're going to end up hosting on GH Pages, and we're running into an issue here at the end. I currently have the site demo hosted at https://nealium104.github.io/lextalk-tech/. Whenever the user navigates to another page and then back the homepage, the URL directs to https://nealium104.github.io/lextalk- which obviously throws a 404. I've tried setting the basepath to a few different things, but I still can't figure out what it needs to be set to.
Here's my GitHub Repo for reference. https://github.com/Nealium104/lextalk-tech
Here's my GitHub Repo for reference. https://github.com/Nealium104/lextalk-tech
11 Replies
i see your issue, does enabling trailing slashes fix it?
Answer
from my understanding, it is trying to access this wrong, and then error page does weird things to url...
also, is this your actual db url: https://github.com/Nealium104/lextalk-tech/blob/main/.env (prob shouldn't be in github if so..)
CinnamonOP
That makes a lot of sense. I just pushed the change to the next config. 🤞
@riský also, is this your actual db url: <https://github.com/Nealium104/lextalk-tech/blob/main/.env> (prob shouldn't be in github if so..)
CinnamonOP
Major oof. That is a really old change too.
i think your github actions error was because you added slash to base path, only add training slash option, and keep base normal/like before
CinnamonOP
Success!
Thank you so much!
YAY 🎉
yeah, i kinda wasn't sure if it would fix it, but glad to hear that 🙂
CinnamonOP
Yeah, I've been busting my head trying to figure it out. This isn't even where we're hosting on the final version anyway, but I think I understand it enough to make the final changes at the end.