Can hugo be configured to only consider files with frontmatter as posts/pages? I have some other files within my content directory that I don’t want to be considered and I also don’t want to add frontmatter to them to tell hugo to ignore them (with published = false
). Can we tell hugo to ignore all files without frontmatter?
Markdown or HTML files without frontmatter under /content/
are not rendered by Hugo. But Hugo doesn’t ignore them instead it throws errors about the missing frontmatter.
You should probably use the /data/
folder for these files.
I’ve been having issues where it is picking up that content. The content is under /content/post/2017-07-22/
. So maybe the fact that it is under /content/post/
is changing the behavior?
Well if it is picking up the content then move it to the data folder. It won’t get rendered from there unless you instruct Hugo to do so.