How to use ignoreFiles to ignore a in a section folder

Like the title says I’m trying to use ignoreFiles to not render a file I have inside a section folder.

I have tried using the following without any luck:

ignoreFiles = ['', '/content/docs/', '\content\docs\', '^README'], 

What am I doing wrong? Thanks.

There might be a better way to do this but top of my head. Add this to your site’s config.yaml:

- _target:
    path: /docs/README.*
    kind: page
    render: never
    list: never

You could also add it to the section’s's front matter and make the path relative (untested)

1 Like

Thanks for pointing this out, since I am using toml this is what I ended up using in case anyone else needs to do something similar:

    path = "/docs/README.*"
    render = "never"
    list = "never"

while you’re there would you try including the full file path and (/docs/ and see if it works?

Not sure why I assume it wouldn’t.

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