New collections #248
Replies: 1 comment 7 replies
-
Hi @iampoundcake. I hope I haven't made it more difficult, my intention was to add example(s) for people to copy, so apologies if that's not the case. To answer your question, the theme uses It sounds like you want to add another collection, which does mean you will have to define multiple. Each collection is separate from each other and you'll need to use Astro's getCollection to query each collection you add separately. Let me know if any of that doesn't makes sense, if your repo is public I could take a quick look if required. Hope that helps. |
Beta Was this translation helpful? Give feedback.
-
Anyone else having difficulty with creating new collections? I will absolutely concede that it is a user-error/user ignorance. My buddy (who codes) and i were doing some root cause and testing, and we kept hitting a wall when we finally go to inject a collection in a page. I know other astro sites are simpler and less conducive to scale, so I wanted to know, just to make sure, how I should go about new collections. I also tried chatgpt but i feel like it's just breaking more things.
I did try to do this with a test file, but i keep getting an error that the "map" is unrecognized or undefined. The original code says "allPosts..." and works. (i used "TEST" as an example of the definition of the collection)
allTESTByDate.map((p) => (
Anyway, any help or thoughts are appreciated. I could just use the tags, and figure out a way to stylize pages based on tags, but i'd like to figure this out if i can.
Beta Was this translation helpful? Give feedback.
All reactions