Update template to Astro 5.0, use Content Collections
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
---
|
||||
import { getCollection } from "astro:content";
|
||||
import BaseHead from "../components/BaseHead.astro";
|
||||
import Header from "../components/Header.astro";
|
||||
import Footer from "../components/Footer.astro";
|
||||
@@ -6,7 +7,7 @@ import ColorScript from "../components/ColorScript.astro";
|
||||
import Tags from "../components/Tags.astro";
|
||||
import getTags from "../scripts/getTags";
|
||||
|
||||
const posts = await Astro.glob("../posts/*.md");
|
||||
const posts = await getCollection("posts");
|
||||
const allTags = getTags(posts);
|
||||
|
||||
let {
|
||||
|
||||
Reference in New Issue
Block a user