I undefine baseURL in my site as I prefer relative links. However, there is a bug which occurs when baseURL is undefined.
Pre-this-PR:
If baseURL is http://example.com, then {{ absLangURL "" }} produces http://example.com ... which is partially correct but works.
If baseURL is undefined, then {{ absLangURL "" }} produces an empty string (ie. '') ... which is incorrect. It just links back to the existing page instead of the root of the site.
Post-this-PR:
If baseURL is http://example.com, then {{ absLangURL "/" }} produces http://example.com/ ... which is more correct.
If baseURL is undefined, then {{ absLangURL "/" }} produces / ... which is correct.
Screenshots (if applicable)
Not applicable
Checklist
Ensure you have checked off the following before submitting your PR.
Changes / fixes
Hi,
I undefine baseURL in my site as I prefer relative links. However, there is a bug which occurs when baseURL is undefined.
Pre-this-PR:
If baseURL is
http://example.com
, then{{ absLangURL "" }}
produceshttp://example.com
... which is partially correct but works.If baseURL is undefined, then
{{ absLangURL "" }}
produces an empty string (ie. '') ... which is incorrect. It just links back to the existing page instead of the root of the site.Post-this-PR:
If baseURL is
http://example.com
, then{{ absLangURL "/" }}
produceshttp://example.com/
... which is more correct.If baseURL is undefined, then
{{ absLangURL "/" }}
produces/
... which is correct.Screenshots (if applicable)
Not applicable
Checklist
Ensure you have checked off the following before submitting your PR.