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

search and service worker js not loaded from relative url #1007

Closed
olizilla opened this issue Jul 23, 2020 · 2 comments · Fixed by #1009
Closed

search and service worker js not loaded from relative url #1007

olizilla opened this issue Jul 23, 2020 · 2 comments · Fixed by #1009
Assignees
Labels
hint: beta Hint: Issues related to the beta branch
Milestone

Comments

@olizilla
Copy link
Collaborator

olizilla commented Jul 23, 2020

The service worker script sw.js and the flexsearch.js are both loaded dynamically, and the paths are stored in places that hugo cannot re-write to be relative urls...

Screenshot 2020-07-23 at 10 24 17

the relUrl filter in hugo is not sufficient to get fully relative paths across the site. Hugos global relativeUrls parameter re-writes all URLs in standard src and href attributes after the site has been built. URLs stored in JS or custom elements aren't picked up.

The simple fix for this is to upate the preview URLs to use cid-in-subdomain, which is now the preferred mechanism. The service worker is not critical to have working in preview urls, and the flexsearch will be disabled in favour of #984

@olizilla olizilla self-assigned this Jul 23, 2020
@olizilla olizilla added this to To do in beta.spec.filecoin.io via automation Jul 23, 2020
@olizilla olizilla added the hint: beta Hint: Issues related to the beta branch label Jul 23, 2020
@olizilla
Copy link
Collaborator Author

Issue already raised in #993

beta.spec.filecoin.io automation moved this from To do to Done Jul 23, 2020
@olizilla olizilla reopened this Jul 23, 2020
beta.spec.filecoin.io automation moved this from Done to In progress Jul 23, 2020
@olizilla
Copy link
Collaborator Author

nope, that issue was for an issue on the beta.spec.filecoin.io domain, this one is for previews on IPFS.

@hugomrdias hugomrdias added this to the Beta v1 milestone Jul 23, 2020
beta.spec.filecoin.io automation moved this from In progress to Done Jul 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hint: beta Hint: Issues related to the beta branch
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

2 participants