Am trying to exclude a folder inside static folder from the build. I have added the following to config.yaml but it doesn’t seem to work.
ignoreFiles:
- "/static/admin/.*"
Any tips?
Am trying to exclude a folder inside static folder from the build. I have added the following to config.yaml but it doesn’t seem to work.
ignoreFiles:
- "/static/admin/.*"
Any tips?
https://gohugo.io/getting-started/configuration/#ignore-content-files-when-rendering
ignoreFiles
…will cause Hugo to ignore content files
So this:
ignoreFiles:
- "/static/admin/.*"
Will not build these:
content
└── static
└── admin
├── bar.md
└── foo.md
Related:
You cannot currently exclude anything from the static directory.
Thank you @jmooring
ignoreFiles
also works for files and folders under the dataDir
.
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.