-
-
Notifications
You must be signed in to change notification settings - Fork 16.6k
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
Some absolute URLs broken when theme used as project page #500
Comments
IMO the root cause is this theme using
Given the substantial user base, any change in this area would perhaps make many peoples' life difficult though. |
@abelcheung is this a sub-issue of #254 ? I haven't had a chance to look at your recent PR yet, but I assume that PR implements the change you suggest here, is that correct? |
Yes, you can think of it as a subtask of #254, which covers a whole class of generic issues. However, this issue and the PR I submitted cover entirely different parts. The essential portion of PR #497 is And this issue is about absolute links, which need a breaking change for many people (who don't sync changes carefully), and I haven't submitted any PR yet. |
I'm usually extremely conservative and against breaking changes, but I think this is something that should be done. You seem to have a great grasp of this concept, so if you find the time, it would be greatly appreciated if you helped fix this "path variables mess" that currently exists. Even though it's a breaking change, we can include a paragraph that clearly explains how to convert all previous paths to the new correct paths. A similar issue happened a few years ago when GitHub Pages updated to a new version of jekyll that had a different behaviour for some of these variables, so I had an FAQ for the hundreds of people that all of a sudden had their sites broken. It's going to be a painful but necessary change. |
OK, in that case I'll try to prepare a PR by weekend, along with more verbose comments in |
PR #506 submitted. |
This only concerns the case when theme is used as project page (baseurl non-empty). Although the layout templates and misc files have taken care to only prepend
site.url
as absolute url, it won't work ifabsolute_url
liquid filter is used. All such links would have project path component inserted twice (likehttps://user.github.io/proj/proj/aboutme
), resulting in invalid links.This affects at least
jekyll-sitemap
plugin for now, which usesabsolute_url
internally. And most likely affects any other user added plugins utilizingabsolute_url
, as well as user overrided template using such filter.The text was updated successfully, but these errors were encountered: