Any markdown filenames with a dot gets ignored by nuxt content
LoganTann opened this issue · 5 comments
Description
In nuxt content, the standard way to order articles is to prefix the filename with a number. After processing, this prefix gets automatically removed from the "path" attribute
However, it seems like this plugin registers filenames having a dot before the extension to be completely ignored by nuxt content (may be due to this regex pattern)
To reproduce:
- Create a nuxt 3 project using this extension
- Create a markdown file with a dot (eg :
1.test.md
orin.dex.md
) - When querying content, files having a dot before the extension gets ignored
Expected result:
- When querying content, files having a dot and finishing with the
.md
extension should remain visible
Context
- Files in my project : https://github.com/LoganTann/kagescan-nuxt/tree/a04fea9/content/anime/mekakucity-actors
- To query content :
http://localhost:3000/api/_content/query
- Expected : More than 14 results in the array
- Actual : two results
Environment info
v18.14.2
kagescan@
├── @nuxt/content@2.4.3
├── nuxt-content-assets@1.3.0
└── nuxt@3.3.3
Hey, thanks for picking this up.
The internal Nuxt Content ignores RegExp is a little strange as it "bakes in" the delimiters from unstorage (see this issue) hence the RegExp Nuxt Content Assets passes to it being a little gnarly.
It may be that I didn't test ordered content with it in the demo (though I have in other projects) so let me check and get back to you.
OK, I can confirm that the RegExp is the issue 😢
The good news is that it seems to be solvable, so I'm working on getting a patch release out now.
OK, that's released now:
Works like a charm, thank you for fixing this issue 😁
Thanks for bringing it to my attention.. What a show-stopper! 😬