You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Let me start by saying, I'm so happy with what you did in #5704, #5805, and #5818! We use Hugo to provide a multi-lingual product manual and that change makes onboarding new writers much easier.
We use a CI/CD to deliver our Hugo site which also checks if there are no warnings in the output of hugo and unfortunately the warning introduced in f34e617 has an edge case.
Please consider the following example where one of the languages is German (de):
url: 'de/debitorenpreisfindung-zeilenrabatt'
Hugo correctly outputs a warning about the language prefix (de/). Once I change that to:
url: 'debitorenpreisfindung-zeilenrabatt'
Hugo unfortunately still outputs the same warning since de is (incorrectly) assumed to be a language prefix and not part of the URL.
As per f34e617 I know this warning is only active in 0.55. However, I think this might affect a few people and it might confuse people and result in ignoring warnings which is a bad habit.
A solution might be to check whether the supposed prefix is followed by a non-alphanumeric character in f34e617#diff-5129e7484246c664a01e8bb7c023fa12R384 I'd love to provide a PR but unfortunately my Go skills are virtually non-existent.
Activity
bep commentedon Apr 15, 2019
I think you are right. I will add a fix. I kind of knew this would potentially create false warnings, but I thought it would still be worth it ...
[-]Relative Frontmatter URL with language prefix: wrong warning[/-][+]False WARNINGs in lang prefix check[/+]limenet commentedon Apr 15, 2019
@bep thanks for getting back to me so quickly and for adding this to the 0.55.2 milestone! I think the warnings are absolutely worth it :)
github-actions commentedon Feb 18, 2022
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.