Is your feature request related to a problem? Please describe
We usually place relevant file in different directory:
- getting-started/
- index.md
- introduction.md
- installation.md
- ...
Sometime we may want to query all page under a directory, but
const { data } = await useAsyncData("/getting-started/", () =>
queryCollection("content").path("/getting-started/").all(),
);
won't work, as `.path()" is exact match, not prefix match.
Describe the solution you'd like
const { data } = await useAsyncData("/getting-started/", () =>
queryCollection("content").path("/getting-started/").all(),
);
- With trailing slash (
/getting-started/) means query all page under directory
- Without trailing slash (
/getting-started) means query a file (getting-started.md) or an index file (getting-started/index.md).
Describe alternatives you've considered
.where("path", "LIKE", "/getting-started/%")
Additional context
Is your feature request related to a problem? Please describe
We usually place relevant file in different directory:
Sometime we may want to query all page under a directory, but
won't work, as `.path()" is exact match, not prefix match.
Describe the solution you'd like
/getting-started/) means query all page under directory/getting-started) means query a file (getting-started.md) or an index file (getting-started/index.md).Describe alternatives you've considered
.where("path", "LIKE", "/getting-started/%")Additional context