diff --git a/astro.config.mjs b/astro.config.mjs index 61dc4ed..77dbe65 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -16,11 +16,11 @@ export default defineConfig({ defaultLocale: "en", locales: ["en", "fr"], fallback: { - fr: "en" + fr: "en", }, routing: { - prefixDefaultLocale: false - } + prefixDefaultLocale: false, + }, }, prefetch: true, integrations: [ @@ -83,11 +83,17 @@ export default defineConfig({ head: [ { tag: "meta", - attrs: { property: "og:image", content: "https://screwfast.uk" + "/social.png" }, + attrs: { + property: "og:image", + content: "https://screwfast.uk" + "/social.png", + }, }, { tag: "meta", - attrs: { property: "twitter:image", content: "https://screwfast.uk" + "/social.png" }, + attrs: { + property: "twitter:image", + content: "https://screwfast.uk" + "/social.png", + }, }, ], }), diff --git a/src/content/config.ts b/src/content/config.ts index 388a2e0..f095b80 100644 --- a/src/content/config.ts +++ b/src/content/config.ts @@ -76,7 +76,7 @@ const insightsCollection = defineCollection({ schema: ({ image }) => z.object ({ title: z.string(), description: z.string(), - contents: z.array(z.string()), + // contents: z.array(z.string()), cardImage: image(), cardImageAlt: z.string(), }), diff --git a/src/pages/insights/[...slug].astro b/src/pages/insights/[...slug].astro index 56cdf36..8b2e945 100644 --- a/src/pages/insights/[...slug].astro +++ b/src/pages/insights/[...slug].astro @@ -13,15 +13,16 @@ export async function getStaticPaths() { props: { post }, })); } + // Get the props for this page that define a specific insight post const { post } = Astro.props; +const { Content } = await post.render(); + const pageTitle: string = `${post.data.title} | ${SITE.title}`; --- - +
@@ -35,6 +36,12 @@ const pageTitle: string = `${post.data.title} | ${SITE.title}`; format={"avif"} />
+
+
+

+ Table of Contents: +

+
@@ -43,17 +50,77 @@ const pageTitle: string = `${post.data.title} | ${SITE.title}`; > {post.data.title} -
- { - post.data.contents.map((content) => ( -

- {content} -

- )) - } -
+ +
+ +
+ + + +