Open bryndin opened 5 months ago
I've also been having this issue, and in my situation I've managed to narrow it down to letter case, which I didn't pay much attention to before as I'm using a Windows machine.
Using the correct case give me expected results from hugo new content
, and using any incorrect letter case gives me the exact same error output as Bryndin posted. This only happens when attempting to create a file in an existing directory or directories where the letter case in hugo new content
argument is different from letter case in those directory names on the filesystem. Completely new directories and directory chains are created fine.
I can't say for sure if the issue is down to just letter case and whether it's OS-related (since Bryndin's posted output hints at Linux, so one would expect paths to be case-sensitive; unless, of course, the path is entirely handled by Hugo).
In any case, I did find the output printed frustratingly cryptic as a user, so if the letter case is the culprit, it's probably worthwhile to have a more informative error for this situation.
I already had a
content/about
dir. Runninghugo new content about.md
freaks Hugo into panic.[BUG] no Page found for "/home/db/projects/blog/content/about.md"
. Should it say the page exists without panicking? Not sure what is the expected behavior.about.md
before failing (the timestamp matches the command execution time, see the prompt timer). Why did it make it if theabout
directory already exists? I'm new to Hugo and could be missing out, but I'd expect you can have either, not both.What version of Hugo are you using (
hugo version
)?Does this issue reproduce with the latest release?
I presume 0.127.0 is the latest.