How to Prevent Hugo From Publishing Draft Posts Accidentally 0 ▲ BurgeonLab 178 days ago · Tech · hide · Fediverse post Why I Created ThisI have heard of bloggers1 accidentally publishing draft posts and I would feel stressed just hearing about it. In my fourth year writing with Hugo, +95k words later, I also managed to accidentally publish a draft post! 😱 Mine got pushed to the two Main (full-text and summary) and Firehose feeds. I went into more detail about my “draft accident” on my W21-2026 weeknote if you’re interested in the cause. Hugo’s Default Behaviour For DraftsFrom my research, by default, Hugo builds all content without the explicit use of the following draft parameter in the front matter: TOML draft = true YAML draft: true JSON "draft": true This means, any content with the following front matter will be published when building the site: draft = false no draft parameter at all In all my Hugo archetypes (templates for new content), I have the parameter draft = true. But in my latest mishap, because I accidentally deleted this line while editing a neighbouring line, the content lost it’s… Commenting on Bubbles has been removed. Why? If you want to talk about this post, write to the author, use the comments on their blog if it has them, or reply with a "RE:" post on your own blog. Suggestions? feedback@bubbles.town