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

Problems Publishing to Github Pages #371

Open
ds17f opened this issue Aug 20, 2022 · 2 comments · May be fixed by #374
Open

Problems Publishing to Github Pages #371

ds17f opened this issue Aug 20, 2022 · 2 comments · May be fixed by #374

Comments

@ds17f
Copy link

ds17f commented Aug 20, 2022

Hi! This project is amazing! Great work!

I'm trying to use jsnes-web on a github pages site. I'm doing so with the gh-pages package. I've used gh-pages to successfully deploy a react site in the past.

Prior to deployment I've added a line to the package.json (as per gh-pages instructions)

  "homepage": ".",

I've used the following to build and deploy (from the root of jsnes-web)

npm run build
npx gh-pages -d dist

This appears to work. And if I run

npx serve build

I see a working version of the site (locally). When i browse to the corresponding site though, I get a blank page.

Here's the repo and branch that I'm building from: https://github.com/ds17f/jsnes-web/tree/customize
and here's the GH pages site: https://ds17f.github.io/jsnes-web/

Does anybody have any thoughts on why this doesn't work? I would expect to at least see the main title screen which lets me pick a rom. But instead I get nothing. I've also checked the js console and there's no output worth mentioning.

@ds17f
Copy link
Author

ds17f commented Aug 20, 2022

Progress! First change required was in src/App.js

<BrowserRouter>

needs to have a basename added

 <BrowserRouter basename="/jsnes-web">

This at least gets the homepage to load. Still working on the roms.

@ds17f
Copy link
Author

ds17f commented Aug 20, 2022

GOT IT!

src/ListPage.js needs to be updated to be aware of the base path as well.

I'm going to put together a PR that exposes this as a configuration variable so that it all works pretty easily.

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

Successfully merging a pull request may close this issue.

1 participant