fix(routing): [closes #168] Construct redirect URL correctly (#170)

* docs(readme): add note about syncing forks
* fix(routing): use correct pathSegmentsToKeep
This commit is contained in:
Jeremy Kahn 2023-09-30 10:36:27 -05:00 committed by GitHub
parent 667c0b666f
commit 0e2da32c25
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View File

@ -168,7 +168,9 @@ Explore the files in `src/config` to modify pairing and relay server configurati
### Troubleshooting
If you run into any issues with a custom Chitchatter installation, first ensure that you are using [the latest version of the code](https://github.com/jeremyckahn/chitchatter/tree/main).
If you run into any issues with a custom Chitchatter installation, first ensure that you are using [the latest version of the code](https://github.com/jeremyckahn/chitchatter/tree/main). If you are hosting your installation with GitHub Pages, sync your `main` branch and _not_ your `gh-pages` branch. Updating your `main` branch will trigger a proper rebuild of your `gh-pages` branch.
- https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork
#### Peers won't connect

View File

@ -24,7 +24,10 @@
// https://username.github.io/repo-name/one/two?a=b&c=d#qwe becomes
// https://username.github.io/repo-name/?/one/two&a=b~and~c=d#qwe
// Otherwise, leave pathSegmentsToKeep as 0.
var pathSegmentsToKeep = 0
//var pathSegmentsToKeep = 0
var pathSegmentsToKeep = window.location.origin.endsWith('.github.io')
? 1
: 0
var l = window.location
l.replace(