I have a set of files in content folder in this order
out of these, I would like to ignore the rendering of service1.html and service2.html as and when I require. To this extent, I have tried various regex options using the
ignorefiles options in config toml file. Also, the ignorefiles parameter is just below the
title parameter…right at the top…before any other parameter is declared.
ignorefiles = [ "\\w*service1.html\b", "\\w*service2.html\b" ]
ignorefiles = [ "*/*/service1.html", "*/*/service2.html" ]
but they don’t get ignored and keep coming in the public folder.
Is there a way to ignore some folders or files in Hugo while rendering them
Are those content files (markdown) which produce those HTML?
If so you check Build Options.
Otherwise, we might need more information as to what are those folders in you content directory.
I have tried the link that you gave and it seems to be a straightforward solution. So first, thank you for the same.
I have implemented that by putting that in the front matter of the content files that I don’t want to render at the very end, like so
title="My Service Page 1"
list = false
render = false
Notice that I have converted the YAML format to toml format. I hope that isn’t the issue…but nevertheless the page still renders in spite of marking the
and I am running the build command like this
hugo --destination article --templateMetrics
What’s your version of Hugo? The Build Options were introduced in 0.65
If your version is >= .65 then could kindly provide a repo for us to play around with?
My local version of hugo is 0.62. But on server we use 0.64.
Can you provide your email address, so that I can add you to the repo (as its a private repo)
You may also choose to send your email id to my email id email@example.com
Mmmmm … what can go wrong
Thanks for pointing out. It worked out very nicely.
Regis, its a really nice community and you are really a great person. It worked out really nicely. Please do continue this great service as its really a life saver.
Is there a way I can repharase the question so that it becomes useful for others.
Thanks to Devinerites tooo…
Ps : If you still want to take a look, please do send your email to my email ( a test email) and I will take add you to the repo.
Peace and Love
I was blind. Now I see my oversight and your pun…
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.