-
Notifications
You must be signed in to change notification settings - Fork 915
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
Fix links for single language sites #1744
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This breaks the page-meta links for some pages on the OTel website, for example the mission page. I'll investigate further as soon as I can.
@LisaFC et al. - do you have a reference to a public site that exhibits the broken page-meta links? Or do you have a simple test case to reproduce the problem? |
Ah, nm, found one :) |
@@ -1,5 +1,5 @@ | |||
{{ if .File }} | |||
{{ $pathFormatted := replace .File.Path "\\" "/" -}} | |||
{{ $pathFormatted := strings.TrimPrefix hugo.WorkingDir $.File.Filename -}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The line your are changing was added in support of builds under Windows:
Removing the line will introduce a regression IMHO.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, our tests are passing under windows, so I'll assume that this is still ok. If not, we can address the regression later.
Ok, let me take a further look |
If you remove the overridden partial in this project you should see the problem: /~https://github.com/LisaFC/monolang |
I got the monolang repo working with Docsy at HEAD (using simple front matter) but, regardless, I'm feeling that your fix is the right way to go! 🎉 I have a tweaked version locally, and will share it + more feedback when I'm back. |
4ae6460
to
4d54e5d
Compare
4d54e5d
to
f76155b
Compare
f76155b
to
9d78f6b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! This definitely seems like the right way to fix this. There is some cleanup in the code that I'd like to do, but I'll address that in a followup PR, and add a statement about this being a breaking change to the CHANGELOG.
@@ -1,5 +1,5 @@ | |||
{{ if .File }} | |||
{{ $pathFormatted := replace .File.Path "\\" "/" -}} | |||
{{ $pathFormatted := strings.TrimPrefix hugo.WorkingDir $.File.Filename -}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, our tests are passing under windows, so I'll assume that this is still ok. If not, we can address the regression later.
.Site.IsMultiLingual
#981Requires Hugo 0.112.0+