Enhancement: excludeSubdir as array of paths to ignore #438

Open
opened 2026-10-05 02:47:31 +02:00 by adam · 1 comment
Owner

excludeSubdir currently only has a boolean as an option. I read your post about submodules in Hugo and realized that you have set up your website to have markdown files in content for all pages, then for blog posts markdown files in the posts directory. This makes differentiating between "pages" and "posts" is very clean.

But: assume the following content structure (also Hugo):

content

  • page1/index.md
  • page2/index.md
  • blog/2020/...
  • blog/2021/...

This is currently not possible to set up. If excludeSubdir would allow for an array of folder names, the configuration could have an excludeSubdir: ['blog'] for the page content type. All would be well in these more complicated case structures.

(Edit: I currently do a content type per subfolder instead.)

`excludeSubdir` currently only has a boolean as an option. I read your [post about submodules in Hugo](https://www.eliostruyf.com/managing-hugo-website-content-asset-submodule/) and realized that you have set up your website to have markdown files in content for all pages, then for blog posts markdown files in the posts directory. This makes differentiating between "pages" and "posts" is very clean. But: assume the following content structure (also Hugo): content - page1/index.md - page2/index.md - blog/2020/... - blog/2021/... This is currently not possible to set up. If `excludeSubdir` would allow for an array of folder names, the configuration could have an `excludeSubdir: ['blog']` for the page content type. All would be well in these more complicated case structures. (Edit: I currently do a content type per subfolder instead.) <!-- github-sync-id:1645318426 -->
Author
Owner

We could make it an option to have it a boolean or an array.

We could make it an option to have it a `boolean` or an `array`. <!-- github-comment-id:1488931003 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/vscode-front-matter#438