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

publicUrl doesn't behave as expected. #261

Closed
1 task done
Morgul opened this issue Jun 12, 2019 · 2 comments · Fixed by #263
Closed
1 task done

publicUrl doesn't behave as expected. #261

Morgul opened this issue Jun 12, 2019 · 2 comments · Fixed by #263
Assignees
Labels
bug Something isn't working 🎁 Rewarded on Issuehunt This issue has been rewarded on Issuehunt

Comments

@Morgul
Copy link

Morgul commented Jun 12, 2019

Issuehunt badges

  • I confirm that this is an issue rather than a question.

Bug report

Setting build.publicUrl seems to correctly change the expected path for importing out of _saber, but the generated site still thinks that 'home' is / not /publicURL/.

I'm attempting to use saber to generate internal documentation on a self-hosted gitlab instance, using GitlabPages. Our pages urls are in the form of https://group-name.pages.git.example.com/project-name/. Setting publicUrl to /project-name/, while the site technically works, means that going to the index page takes me to the 404, and I have to hit 'back to home' to get the index, which has changed the url to be https://group-name.git.example.com/.

Version

v0.6.7

Steps to reproduce

You can see an illustration of this here:
https://morgul.gitlab.io/saber-publicurl-bug/

All that was required to reproduce it, however was:

  1. Start a basic saber project.
  2. Set publicUrl
  3. Serve on a location other than /

Note: When I didn't have a theme set, I got a weird combination of the 404 page with some of the index page's content mixed in. Setting a theme just gets me just the normal 404 page.

What is expected?

I would expect to see the site.

What is actually happening?

I get the 404 page, and the 'Back' button takes me to the site correctly, but the URL is wrong, and refreshing the page, of course, generates a 404.

Other relevant information

  • Result of running saber -v:
    • saber/0.6.7 darwin-x64 node-v12.4.0
  • Browser version (optional):
    • Chrome Version 74.0.3729.169 (Official Build) (64-bit)
  • Is Saber a global or local install?
    • local
  • Which package manager did you use for the install?
    • yarn
  • Does this issue occur when all plugins are disabled?
    • yes

IssueHunt Summary

krmax44 krmax44 has been rewarded.

Sponsors (Total: $60.00)

Tips

@egoist egoist added the bug Something isn't working label Jun 13, 2019
@issuehunt-oss issuehunt-oss bot added the 💵 Funded on Issuehunt This issue has been funded on Issuehunt label Jun 13, 2019
@issuehunt-oss
Copy link

issuehunt-oss bot commented Jun 13, 2019

@issuehunt has funded $60.00 to this issue.


@krmax44 krmax44 self-assigned this Jun 13, 2019
krmax44 added a commit to krmax44/saber that referenced this issue Jun 13, 2019
egoist pushed a commit that referenced this issue Jun 14, 2019
* fix: #261

* fix: absolute paths/urls only

* docs: elaborate publicUrl

* use __PUBLIC_URL__

* tweaks
@issuehunt-oss issuehunt-oss bot added 🎁 Rewarded on Issuehunt This issue has been rewarded on Issuehunt and removed 💵 Funded on Issuehunt This issue has been funded on Issuehunt labels Jun 14, 2019
@issuehunt-oss
Copy link

issuehunt-oss bot commented Jun 14, 2019

@egoist has rewarded $42.00 to @krmax44. See it on IssueHunt

  • 💰 Total deposit: $60.00
  • 🎉 Repository reward(20%): $12.00
  • 🔧 Service fee(10%): $6.00

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working 🎁 Rewarded on Issuehunt This issue has been rewarded on Issuehunt
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants