diff --git a/src/components/Testimonials.jsx b/src/components/Testimonials.jsx index 1304ebc..837a824 100644 --- a/src/components/Testimonials.jsx +++ b/src/components/Testimonials.jsx @@ -150,7 +150,7 @@ function Testimonials({ testimonials }) {
{current.data.preview}
{current.data.author}
- + Read more! diff --git a/src/pages/blog.astro b/src/pages/blog.astro index 1b23cc5..60bc439 100644 --- a/src/pages/blog.astro +++ b/src/pages/blog.astro @@ -13,7 +13,7 @@ const blogEntries = await getCollection("blog"); .map((blogEntry) => { const { title, author, date } = blogEntry.data; return ( - +

{title}

diff --git a/src/pages/blog/[...slug].astro b/src/pages/blog/[...id].astro similarity index 92% rename from src/pages/blog/[...slug].astro rename to src/pages/blog/[...id].astro index efe9b9b..6074c58 100644 --- a/src/pages/blog/[...slug].astro +++ b/src/pages/blog/[...id].astro @@ -1,5 +1,5 @@ --- -import { getCollection } from "astro:content"; +import { getCollection, render } from "astro:content"; import PageLayout from "../../layouts/PageLayout.astro"; export async function getStaticPaths() { @@ -7,13 +7,13 @@ export async function getStaticPaths() { const colors = ["magenta", "cyan", "yellow"]; return blogs.map((entry, idx) => ({ - params: { slug: entry.slug }, + params: { id: entry.id }, props: { entry, color: colors[idx % colors.length] }, })); } const { entry, color } = Astro.props; -const { Content } = await entry.render(); +const { Content } = await render(entry); const { title, date, author, profilePicture } = entry.data; const authorData = { picture: profilePicture, name: author }; diff --git a/src/pages/sessions.astro b/src/pages/sessions.astro index c7d77c3..cfc1c71 100644 --- a/src/pages/sessions.astro +++ b/src/pages/sessions.astro @@ -12,7 +12,7 @@ const sessions = await getCollection("sessions").then((sessions) => { title: session.data.title, date: session.data.date, champion: session.data.champion, - slug: session.slug, + slug: session.id, }; }); }); diff --git a/src/pages/sessions/[...slug].astro b/src/pages/sessions/[...id].astro similarity index 95% rename from src/pages/sessions/[...slug].astro rename to src/pages/sessions/[...id].astro index 8ce1f66..931cb94 100644 --- a/src/pages/sessions/[...slug].astro +++ b/src/pages/sessions/[...id].astro @@ -1,5 +1,5 @@ --- -import { getCollection } from "astro:content"; +import { getCollection, render } from "astro:content"; import PageLayout from "../../layouts/PageLayout.astro"; import LocalTime from "../../components/LocalTime.jsx"; import YouTubeVideo from "../../components/YouTubeVideo.astro"; @@ -9,13 +9,13 @@ export async function getStaticPaths() { const colors = ["magenta", "yellow", "cyan"]; return sessionEntries.map((entry, idx) => ({ - params: { slug: entry.slug }, + params: { id: entry.id }, props: { entry, color: colors[idx % colors.length] }, })); } const { entry, color } = Astro.props; -const { Content } = await entry.render(); +const { Content } = await render(entry); const { title, company,