ignoreFiles not ignoring files

Hi,
I have the following structure

content
    /post
        /my-article
            index.html
            /comments
                a.json
                b.json

The contents of the datafiles is processed by “index.html” (os.readDir & GetJSON) and the “*.json” files should not be available in the “public” directory.

As far as I understood the documentation, adding “ignoreFiles” to my “config.toml” should do the trick.

However, when adding

ignoreFiles = ['\.json$']

the json-files are still copied over, but when using

ignoreFiles = ['comments/*']

in ignoreFiles the files (and folder) are not copied.

However, this doesn’t look like a valid “regular expression to match against the absolute file path” and so I’m trying to find out what I’m doing wrong …

Any advices?

ignoreFiles has some limitations. I have not read your case, but I would recommend that you instead look at

And the options for include*/excludeFiles.

I will add a linke to the documentation to make this easier to discover.

Thanks, I’ll look into it.