Exclude one md file from building when building drafts

I know I can mark file as draft and exclude from deployment, but what If I want to exclude file completely from building? ( by putting it in hugo yam for examplel)

I use external setup for managing my writing that create its config file in yaml of a md file, I would like to not see it when building drafts too

https://gohugo.io/getting-started/configuration/#ignore-content-and-data-files-when-rendering

1 Like

Thanks! I missed this, I had tried to google things instead of going through the pages :frowning:

I ended up picking the newer module approach

[module]
[[module.mounts]]
  excludeFiles = 'posts/Index.md'
  source = 'content'
  target = 'content'
1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.