-
-
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
Remove broken undraft command #4353
Comments
I think this "undraft" command was not such a good idea. We obviously needs tests for the commands package, but this is not the first time that this command is broken and needs fixing. I suggest we just remove that command. It feels more natural to just edit the front matter with a text editor. |
@bep that's what I was doing originally, just change the draft to |
According to @bep, it is easier to undraft content by editing manually the frontmatter of said content by setting the draft flag to `false`, or removing it completely, than to rely on the undraft command which is a source of many bugs. Fixes gohugoio#4353
I suspect that is the "fast render mode" talking. There is a recent issue + PR about that. |
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. |
Hello!
When trying to undraft content with
hugo undraft content/blog/article.md
Hugo will panic with the following:This only happens when the frontmatter is in the following format (I believe toml):
If the frontmatter is like in the markdown files found in the
examples
directory (I believe yaml):the undrafting goes through OK.
This happens for me with both 0.34, and latest master.
I will try and investigate a bit more, maybe I can submit a patch for this.
The text was updated successfully, but these errors were encountered: