use relative and absolute URLs#835
Conversation
|
@chriscool please review |
|
Please try to explain the reasons for doing that a bit better than "This removes hard-coded domain name from subpages". It seems to me that there are some drawbacks to URLs like
I agree that it could perhaps help a bit with moving to git-scm.org, but I find the syntax quite complex. Isn't there a simpler syntax? |
Let' separate this into 2 different problems. 1. Remove host from URL to the same website, making relative URLs. 2. Add support for additional path after host Note. If this website will ALWAYS be located without path, then all In RSS 'feed.xml' I used
Didn't think about it.
using Jekyll filter You can directly add |
|
@jnareb, @mjaix, @sivaraam, @To1ne, @stepnem do you have an opinion on this? I think such |
|
Sorry. Somehow missed the ping. I think having a way to specify relative URLs would indeed be helpful. It may not be worth it at the moment if the plan to move the site somewhere else isn't particularly in progress. That said, it may be very much feasible to have a CI tool that would validate existence of such relative URLs while building. We could also explore a more convenient way to specify the relative URL as simply the portion without the domain name rather than having a custom template like the one in this PR. @MuxaJIbI4 have you already explored the possibility of simplifying how relative links are specified? |
see issue #830 for full description.
Now test website (with not empty path after host) looks and works correctly (CSS) => https://muxajibi4.github.io/git.github.io/
Not fixed links in older files:
1. ignored (for now?) absolute links (with host) to https://git.github.io in files:
2. Didn't add
relative_urlin links to '/images/*' in files:Git-Logo-1788C.png
SoC-2016-Org-Application.md
SoC-2017-Org-Application.md
SoC-2018-Org-Application.md
SoC-2019-Org-Application.md
SoC-2020-Org-Application.md
SoC-2021-Org-Application.md
SoC-2022-Org-Application.md
git_merge_2020_cake.jpg
2020-03-25-edition-61.markdown
git_merge_2020_timeline.jpg
2020-03-25-edition-61.markdown
logo.png
SoC-2014-Org-Application.md
SoC-2015-Org-Application.md