Exclude all files within the sub-directory?

Hi,

For couple of powerpoints, I would like to place some images in subdirectory ./img-src for some of contents… I would like to exclude all files within the subdirectory img-src/ from beeing embedded in hugo container. content/en/docs/introduction/api-management-components)/ **img-src** /

I mean, ı am using hugo with docker and ı would like to exclude all these files. How can I achieve this ?

content/en/dpcs
└── post
    ├── post01
    │   ├── img-src
    │   ├── image.jpg
    │   └── index.md
    └── post02
        ├── img-src
        ├── image.jpg
        └── index.md

Regards

In your project’s config try adding the following setting (this is for TOML syntax):

ignoreFiles = ["img-src/\\.*"]

Also see the documentation for the other supported syntaxes like YAML:

@alexandros silly question but how can I verify whether it worked or not? Is there any hugo command to show ?

hugo server -e [config] did not display

You can execute the command Hugo locally and then look at the contents of the /public/ directory.
If the files are not present, then it worked.

thanks a lot @alexandros

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