How to skip a README.md in a specific folder?

All of my Hugo’s project work awesome! Thanks!

And now I need to copy a static structure to the content folder.

My structure

- content
  - en
  - ru
    - article
    - post
    - laboratory
      - vendors
        - README.md
      - item1
      - item2
      - itemN

All works as I expect. But I need to skip build README.md and leave it as it is. I need all files from http://127.0.0.1:1313/laboratory/vendors should returned as files without any external html.

At the moment it’s not like I want. My public folder is

- public
  - article
  - post
  - laboratory
    - vendors
      - readme
        - index.html
    - item1
    - item2
    - itemN

I need skip only this readme/index.html. This is mainly associated with licenses or with the supply of code from outside. I would not want to control unnecessary files where they are not needed.

At now my builds kill the extra files and folders but I think the Hugo can do more and that feature can be independent of a theme.

Best!

You want to ignore content files when rendering? Google “ignore content files when rendering gohugo” and get this result:

Other than that: Hugo’s only job is to (and I don’t use that term if it does not fit) literally create a website from md files :wink: don’t add md files that you don’t want to render :wink:

ignoreFiles = [ "content/ru/laboratory/vendors" ]
1 Like

ignoreFiles = ["vendors\\.*"]

could do the trick (not tested)

1 Like

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