| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
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 {{ '/Hacking-Git/' | relative_url }} instead of https://git.github.io/Hacking-Git/, especially:
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? |
Sorry, something went wrong.
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 relative_url can be deleted (but host should still be removed). In RSS 'feed.xml' I used absolute_url because in RSS reader it becomes external URL.
Didn't think about it.
using Jekyll filter relative_url is the simplest form of adding site.url and site.baseurl to the full URL. You can directly add site.baseurl to the links like in https://github.com/git/git-reference/blob/gh-pages/_layouts/reference.html. This is not recommended compared to relative_url according to docs https://jekyllrb.com/docs/liquid/filters/ |
Sorry, something went wrong.
|
@jnareb, @mjaix, @sivaraam, @To1ne, @stepnem do you have an opinion on this? I think such {{ '/Hacking-Git/' | relative_url }} instead of https://git.github.io/Hacking-Git/ might be a bit cumbersome to create and maintain, but maybe some tools can help us (CI jobs maybe) and it's worth it? What do you think? |
Sorry, something went wrong.
|
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? |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
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_url in 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