nuxt / content

The file-based CMS for your Nuxt application, powered by Markdown and Vue components.
https://content.nuxt.com
MIT License
3.08k stars 624 forks source link

No possibility to query content from hidden folders #2530

Closed cjohannsenscayle closed 1 month ago

cjohannsenscayle commented 8 months ago

Environment

All environments

- Operating System: Darwin
- Node Version:     v20.8.0
- Nuxt Version:     3.9.3
- CLI Version:      3.10.0
- Nitro Version:    2.8.1
- Package Manager:  yarn@1.22.19
- Builder:          -
- User Config:      devtools, modules
- Runtime Modules:  @nuxt/content@2.11.0
- Build Modules:    -

Reproduction

See slug.vue#L16 for an MCVE, or try to call queryContent on a file in a hidden folder.

Describe the bug

I want to load a JSON/YAML file which is placed via gitbook into the folder .gitbook, but nuxt content ignores all folders starting with a ..

The docs says that the default for the config value is ['\\.', '-'], but when I try to override it with an empty array, hidden folders are still ignored. Here is the line of code which is responsible for that and I am wondering, if this is intended to be hardcoded there.

At the moment the only workaround I see is to fork the content module and remove that line of code for my project.

Is there any chance to make this configurable and allow hidden folders via config?

Additional context

When placing a swagger element (for openapi docs) in gitbook, it saves the yaml/json automatically in a .gitbook/assets folder, without any chance to configure that path. This causes problems, because I sync the gitbook content into the /content directory, to have the output immediately available.

Logs

No response

github-actions[bot] commented 2 months ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.

github-actions[bot] commented 1 month ago

This issue was closed because it has been stalled for 30 days with no activity.