Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working in production #51

Open
jackherizsmith opened this issue Jul 24, 2020 · 2 comments
Open

Not working in production #51

jackherizsmith opened this issue Jul 24, 2020 · 2 comments

Comments

@jackherizsmith
Copy link

Hi, the script tag links to a local filepath, which works locally but not when deployed (because GitHub Pages hosts files differently to how they look in your repo)

Here is Oli's more detailed answer when I asked him:

the script.js file isn't at /script.js, it's at /Wk2-ABEH-Doogle/script.js

they've used an absolute URL (<script src="/script.js"> )

which is relative to the root domain (GitHub Pages deploys at sub-routes annoyingly)

probably fixable by just removing the slash (<script src="script.js">)

@fairyaksh
Copy link
Collaborator

Hi Jack,

Thanks for the comment & for Oli's answer.

We've changed the link to just "script.js" earlier as someone else also raised this issue.

We're just wondering if its still not working after our edit? 🤔 Or not?

@jackherizsmith
Copy link
Author

It is now working 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants