Skip to content
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

Broken URLs since Hugo 101 due to leading slash and relURL #1114

Closed
2 tasks done
Marzal opened this issue Jul 25, 2022 · 5 comments · Fixed by #1134
Closed
2 tasks done

Broken URLs since Hugo 101 due to leading slash and relURL #1114

Marzal opened this issue Jul 25, 2022 · 5 comments · Fixed by #1134
Assignees
Labels
bug Something isn't working e0-minutes Effort < 60 min e1-hours p0-critical

Comments

@LisaFC
Copy link
Collaborator

LisaFC commented Jul 27, 2022

Thanks for spotting that, does it look like this is a permanent breaking change in Hugo that we'll need to work around/update or something that's likely to go away in a future version?

@Marzal
Copy link
Contributor Author

Marzal commented Jul 27, 2022

Thanks for spotting that, does it look like this is a permanent breaking change in Hugo that we'll need to work around/update or something that's likely to go away in a future version?

As far as I understand from the conversation in the links above, the old behavior (Hugo <101) was an unwanted behavior now fixed.

Here is a good summary of how things are now implemented:
gohugoio/hugo#9994 (comment)
gohugoio/hugo#10049 (comment)

@chalin
Copy link
Collaborator

chalin commented Jul 27, 2022

Thanks for the detailed report @Marzal! I'm investigating.

@chalin chalin added bug Something isn't working e0-minutes Effort < 60 min e1-hours p0-critical labels Jul 27, 2022
@chalin chalin self-assigned this Jul 27, 2022
@chalin
Copy link
Collaborator

chalin commented Jul 27, 2022

From #1127 (comment), @Marzal wrote:

I only have doubts about this one: https://github.com/google/docsy/blob/main/layouts/404.html#L5 <p>Oops! This page doesn't exist. Try going back to our <a href="{{ "/" | relURL }}">home page</a>.</p> Some other projects put "" in similar cases toppers/hakoniwa@ccdd258#diff-42986cf40ad96f5b7ca39d9b71ba6a9f252656de24cfe82100892ff0f4400f90L4

From the tests that I've run, surprisingly "/" seems to still work, but that seems odd. Thanks for the reference, I'll give "" a try.

@chalin
Copy link
Collaborator

chalin commented Jul 28, 2022

I don't believe that there are any further changes necessary to address this issue. So I consider it closed by #1134.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working e0-minutes Effort < 60 min e1-hours p0-critical
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants