-
-
Notifications
You must be signed in to change notification settings - Fork 105
Description
Is your feature request related to a problem? Please describe.
As of now, frontmatter.content.pageFolders config allows excludeSubdir which is a boolean flag. This is too restrictive to certain workflows.
For example:
We have a docs content folder defined that contains documentation pages. The /.frontmatter/docs/ directory contains handwritten doc files, but there is a subdirectory /.frontmatter/docs/api that has generated pages. These generated pages are not meant to be edited by hand, but they still appear in the CMS dashboard, slowing it down (when the number of pages is in the thousands) and need to be constantly filtered out in the dashboard.
Describe the solution you'd like
Add an excludePaths option to content definitions in frontmatter.content.pageFolders that would be a list of glob patterns and/or regex patterns to match against:
{
"frontMatter.content.pageFolders": [
{
"title": "Pages",
"path": "/.frontmatter/docs",
"excludePaths": [
"api",
"_*.*" // exclude all files starting with an underscore
]
},
}excludePaths option would resolve paths relative to the path option of this config. It should support matching against both directories and filepaths for maximum flexibility, since we may not want to exclude select paths.
Supporting glob patterns is nice for ease of use and regex patterns is nice for more complex cases and flexibility.
Describe alternatives you've considered
Haven't come up with any viable alternatives.