Closed stephlocke closed 6 years ago
@stephlocke, It seems that absURL and absLangURL doesn't take the the subpath into accout.
I made a few tests having baseURL="http://localhost:1313/blog/" in config.toml
Then I used {{ "/" | absURL }} and I got http://localhost:1313/ as a result.
Then I used {{ "/" | relURL }} and I got http://localhost:1313/blog/ as a result as expected
The same goes for Contact link, If you have {{ "#contact" | absURL }} you get http://localhost:1313/blog wich is not what you want
If you have {{ "#contact" | relURL }} you get the correct result http://localhost:1313/blog/#contact
We need to change the use of absURL (as we currently have) to relURL in the navigation links.
@stephlocke I've submitted a pull request for multilingual support, using {{ .Site.BaseURL }} is not useful, so I changed that line to be {{ "/" | relLangURL }} which in the case of
baseURL=http://localhost:1313/blog/ and spanish language gives
http://localhost:1313/blog/es/ which is the expected result
Reverted in PR and closing then 👍
Lines like this use
/
as the root directory, however, this doesn't support sites that are not the root.Instead of
<a href='{{ "/" | relURL }}'>
these could go back to the baseURL methodology to correctly fix the location in these circumstances.Files where this is an issue: