#See content in a subdirectory

3 messages · Page 1 of 1 (latest)

untold tusk
#

I have a content collection set up to see the *.md files in a /posts/ directory.

How can I instruct that content collection to also look at content in /posts/blog/

I'd like all the URLs to be consistent, regardless of what directroy a *.md file is in.

untold tusk
#

So, at first I tried just eliding two calls to getCollection together, and that kind of worked, but that returned an array, which isn't exactly what Astro wants. It actually seems to want a Promise<CollectionEntry<C>[]> which is kind of crazy.

Would appreciate any help here....

languid pollen
#

Hey! I'm sure that getContentCollection will recursively search content folders?

And about your typing issue, might need to see what code you're trying!