-
-
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
Gitinfo fails on unicode filename #3071
Comments
Are you running |
Yes I'm on OSX 10.10.5 and on wercker it runs on a Debian box.
|
The reason I ask about the So, given a Git repo:
So, this is an issue that lives outside of Hugo. Try:
Alternatively:
|
Thanks @bep that was the issue, I searched for a solution on the wrong side.
|
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. |
Just for fun I added a movie reference, while it works for hugo server run, it fails when I build the output be it locally or on wercker.
I have a File named π.md under content (see http://rac.su and look closer at the footer bar on the right)
Adding it to git works but I noticed git status did list it as "content/\317\200.md"
Hugo fails when building it at
ERROR: 2017/02/21 04:38:02 gitinfo.go:63: Failed to find GitInfo for "content/π.md"
Another example of weird file names is 💩.md which git translates to "content/\360\237\222\251.md" which you can find at http://rac.su/💩 if EnableGitInfo is set to false.
While my case is more fun than anything else, this may also have an effect to other unicode characters like chinese filenames, cyrillic filenames, ... that use unicode.
Searching for unicode in filenames issues, seems like many projects fail on that but there should be some way to enhance hugolib/gitinfo.go to actually handle them correctly.
The text was updated successfully, but these errors were encountered: