deno-astro-adapter
deno-astro-adapter copied to clipboard
Astro content collections not working
I'm trying to get content collections running using SSR with Deno. Using the deno-astro-template Astro works, but the collections is empty:
- File: src/pages/blog/index.astro
---
import Layout from "../../layouts/Layout.astro" //"../../layouts/main.astro";
import { getCollection, getEntry } from "astro:content";
const blog_carddata = (await getCollection("blog"));
---
<Layout>
<div>CARDDATA: {blog_carddata}</div>
</Layout>
-
blog dir and mdx files are existing in: src/content/blog/xx.mdx
-
config.ts with
import { defineCollection, z } from "astro:content";
const blogCollection = defineCollection({..});
export const collections = {
blog: blogCollection,
}