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

baseurl of '/' now breaks on GitHub pages #460

Open
3 of 4 tasks
dracos opened this issue Jul 18, 2017 · 6 comments
Open
3 of 4 tasks

baseurl of '/' now breaks on GitHub pages #460

dracos opened this issue Jul 18, 2017 · 6 comments

Comments

@dracos
Copy link
Contributor

dracos commented Jul 18, 2017

Before submitting an issue, please be sure to

This issue affects

  • The site generated by GitHub Pages
  • Building sites locally

What did you do (e.g., steps to reproduce)

I pushed my site with a small change from the last push couple of weeks ago.

What did you expect to happen?

The site to appear as it has done for years :)

What happened instead?

All the styling is lost, because the upgrade to jekyll-github-metadata v2.5.0 means that a config with baseurl set to / is now overridden to baseurl "" and the templates were relying on baseurl being set to /. I understand that baseurl: "/" is incorrect and shouldn't be used (though I can't find any official documentation saying why this shouldn't work okay, only links to Parker's 2014 blog post), but anyway, I didn't expect the whole site to break by adding a new blog post :)

Additional information

gtrefs added a commit to gtrefs/gtrefs.github.io that referenced this issue Jul 19, 2017
gtrefs added a commit to gtrefs/gtrefs.github.io that referenced this issue Jul 19, 2017
@ankitbko
Copy link

I just made 2 line of changes and css of my entire site broke. There should definitely be a shout out when such breaking changes are introduced. Anyway what is the solution for this? Changing {{ site.baseurl }} to {{ "/" | relative_url }} will work?

@dracos
Copy link
Contributor Author

dracos commented Aug 16, 2017

That is what I did in the commit I linked to above, yes (or if you have e.g. {{ site.baseurl }}sub/page/ changing that to {{ "/sub/page/" | relative_url }} and so on).

@ankitbko
Copy link

@dracos Thanks. By the way, it seems to be working fine locally. Any idea how to replicate it locally?

ankitbko added a commit to ankitbko/ankitbko.github.io that referenced this issue Aug 16, 2017
@dracos
Copy link
Contributor Author

dracos commented Aug 16, 2017

@ankitbko You need JEKYLL_ENV=production so that should_add_fallbacks passes, and you need to add jekyll-github-metadata to your gems in _config.yml. With those two things, I get the same issue replicated locally.

arkivm added a commit to arkivm/arkivm.github.io that referenced this issue Sep 8, 2017
Hope this fixes the broken site
Refer: github/pages-gem#460

Signed-off-by: Vikram Narayanan <[email protected]>
hiddenillusion added a commit to hiddenillusion/hiddenillusion.github.io that referenced this issue Oct 6, 2017
apophizzz added a commit to apophizzz/apophis90.github.io that referenced this issue Nov 15, 2017
…site.baseurl }} caused 404 errors after having pushed to Github pages; This is probably related to github/pages-gem#460.
@vgaidarji
Copy link

@dracos thanks for the tip 💪 . I was able to reproduce the issue locally.

loveClubClaire added a commit to loveClubClaire/zach-256.github.io that referenced this issue Jan 3, 2018
rockoder added a commit to rockoder/rockoder.github.io that referenced this issue Jan 14, 2018
rockoder added a commit to rockoder/rockoder.github.io that referenced this issue Jan 14, 2018
rockoder added a commit to rockoder/rockoder.github.io that referenced this issue Jan 14, 2018
sstucki added a commit to sstucki/sstucki.github.io that referenced this issue Feb 1, 2018
teocomi pushed a commit to teocomi/teocomi.github.io that referenced this issue Feb 2, 2018
iangneal added a commit to iangneal/iangneal.github.io that referenced this issue Mar 11, 2018
@meleu
Copy link

meleu commented Mar 15, 2018

YAY! thanks for sharing the workaround!

ManZzup added a commit to ManZzup/blog that referenced this issue Apr 7, 2018
zer4tul added a commit to zer4tul/zer4tul.github.io that referenced this issue May 2, 2018
soarcreator pushed a commit to soarcreator/soarcreator.github.io that referenced this issue May 3, 2018
zer0main added a commit to zer0main/zer0main.github.io that referenced this issue Jun 18, 2018
Latest GitHub pages converts baseurl of '/' to ''.
github/pages-gem#460
zer0main added a commit to zer0main/starius.github.io that referenced this issue Jun 18, 2018
Latest GitHub pages converts baseurl of '/' to ''.
github/pages-gem#460
imanel added a commit to imanel/blog.imanel.org that referenced this issue Jul 6, 2018
ItachiSan added a commit to ItachiSan/itachisan.github.io that referenced this issue Jul 28, 2018
Following the suggestions available here: github/pages-gem#460
camrinbraun added a commit to camrinbraun/camrinbraun.github.io that referenced this issue Oct 24, 2018
camrinbraun added a commit to camrinbraun/camrinbraun.github.io that referenced this issue Oct 24, 2018
joshpuetz added a commit to joshpuetz/joshpuetz.github.io that referenced this issue Jan 27, 2019
richardwestenra added a commit to richardwestenra/richardwestenra.github.io that referenced this issue Aug 11, 2019
kxr added a commit to kxr/kxr.github.io that referenced this issue Dec 1, 2019
fbeeper added a commit to fbeeper/fbeeper.github.io that referenced this issue May 7, 2020
ngquerol added a commit to ngquerol/ngquerol.github.io that referenced this issue May 29, 2020
ngquerol added a commit to ngquerol/ngquerol.github.io that referenced this issue May 29, 2020
ykumards added a commit to ykumards/preeti1205.github.io that referenced this issue May 29, 2020
sylph01 added a commit to argentum-works/argentum-works.github.io that referenced this issue Sep 13, 2021
avapolzin added a commit to siriusb-org/siriusb-org.github.io that referenced this issue Apr 15, 2023
avapolzin added a commit to siriusb-org/siriusb-org.github.io that referenced this issue Apr 15, 2023
ConstantUncle added a commit to ConstantUncle/ConstantUncle.github.io that referenced this issue Dec 2, 2024
Changed {{ site.baseurl }} to {{ "/" | relative_url }} (re: github/pages-gem#460)
ConstantUncle added a commit to ConstantUncle/ConstantUncle.github.io that referenced this issue Dec 2, 2024
changed {{ site.baseurl }} to {{ "/" | relative_url }} re: github/pages-gem#460
ConstantUncle added a commit to ConstantUncle/ConstantUncle.github.io that referenced this issue Dec 2, 2024
More changing {{ site.baseurl }} to {{ "/" | relative_url }} (re: github/pages-gem#460)
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

4 participants