nuxt / content

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

fetchNavigation with /_dir.yml and /index.md return incoherent results #2660

Open jip149 opened 5 months ago

jip149 commented 5 months ago

Environment


Reproduction

https://github.com/jip149/nuxt-content-fetchNavigation-bug

Describe the bug

When content dir has both a _dir.yml and index.md file, metadata from _dir.yml is used, and metadata from index.md can't be found in the navigation.

If the index.md file is removed, metadata from _dir.yml can't be found in the navigation.

Subdirectories work as expected, see the example directory in the repo above.

Additional context

No response

Logs

No response

biroplane commented 2 weeks ago

Did you sove this?

farnabaz commented 1 week ago

Why do you need both _dir.yml and index.md in top level? _dir.yml file mainly exists to provide information when index.md is missing.