Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Improve error message on creating new content with blank archetype #1279
When attempting to create new content with a template that has a empty
I think either a blank file should be ignored (as many templates seem to use them) or a more descriptive error should be displayed.
Hmm, you think so? There's at least 5 templates in the hugoThemes repo that have this empty default.md file. What do you mean by addressing it first?
I think the problem that should be addressed first is having sensible error messages with a clear specification of what inputs (in this case: non-empty archetypes) the hugo binary expects.
This would eliminate all future instances of theme authors writing broken themes. Once that is clarified with a clear specification of acceptable inputs to the hugo binary, the theme writers can be convinced to update their theme repos with fixes.
It is likely that most Hugo users aren't programmers themselves, so non-descript error messages (which in this case, are basically akin to the dread NPE or segfault due to a nullpo reference) may confuse and irritate new Hugo users.
By addressing first I mean: Fix or remove the broken archetypes in the hugoThemes. Open up pull request for each of them.
If at all possible, fix the cause of the error. In this case it is possible.
And a better error message would be welcomed, too. But spending lot of time on very rare error cases doesn't make much sense to me.
referenced this issue
Jul 7, 2016
added a commit
Sep 16, 2016
This issue has been automatically marked as stale because it has not been commented on for at least four months.
The resources of the Hugo team are limited, and so we are asking for your help.
If this is a bug and you can still reproduce this error on the
If this is a feature request, and you feel that it is still valuable, please open a proposal at https://discuss.gohugo.io/.
This issue will automatically be closed in four months if no further activity occurs. Thank you for all your contributions.
Note/Update: This issue is marked as stale, and I may have said something earlier about "opening a thread on the discussion forum". Please don't.
If this is a bug and you can still reproduce this error on the latest
If this is a feature request, and you feel that it is still relevant and valuable, please tell us why.