Ignore ( Exclude ) a directory anywhere

Current state
One can ignore files only in content and data folder as per ignoreFiles configuration.

Request
To be able to exclude or include ( an override for the subfolder of excluded folder ) any folder anywhere just like Exclude and Include feature in Jekyll.

Why requested
This helps in removing unwanted content from being processed in production. eg. CSS frameworks like Foundation CSS have a lot of files which are not useful for production. Only the genereated CSS, JS assets are useful for production. Hugo should be able to render only the assets folder of Foundation CSS not whole Foundation CSS folder, which has a lot of NPM packages.

Current workaround
Using .gitignore to make sure only required files are pushed to production.

Cross posting is not allowed in this forum. Please read the forum rules at:

https://discourse.gohugo.io/

Regarding your question others will look into it.

See Configure Modules | Hugo

1 Like

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