1 hour ago · Tech · 0 comments

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…

No comments yet. Log in to reply on the Fediverse. Comments will appear here.