-
-
Notifications
You must be signed in to change notification settings - Fork 7.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
Bug in relURL with leading slash when baseURL includes a subdirectory #9994
Comments
So, this is a bug, but not as described. It's |
OK, looking at the code, my conclusion above wasn't right, we:
So, given that, the example above would be:
And
|
I had a regression upgrading from hugo 0.100.2 to 0.101.0 and this seems to be the only change that would be related: |
@gravis comments on closed issues/PRs are rarely read, please open a new issue if you feal this is an issue, but I suggest you just remove the leading "/" from your ref. |
These paths are intended to be relative to the base URL, not the host. The behavior that was relied upon was apparently buggy and fixed in Hugo 0.101.0: gohugoio/hugo#9994 The behavior without leading slashes should be as expected in both 0.101.0 and previous versions.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
This is not a new issue; behavior present in v0.54.0 through v0.100.2.
config.toml
template
result
Notice that the subdirectory from
baseURL
is repeated when usingrelURL
, but it is not repeated when usingabsURL
.This has come up a few times in the forum, usually in conjunction with menu iteration:
Note that the same differences are present when comparing
relLangURL
andabsLangURL
.The text was updated successfully, but these errors were encountered: