Add Coral comments and Rybbit analytics
Some checks are pending
Build / build (push) Waiting to run

This commit is contained in:
Neeldhara Misra 2026-06-24 00:12:31 +05:30
parent 00f4b98df4
commit 3fae4a6daf
28 changed files with 428 additions and 14 deletions

View file

@ -1,5 +1,6 @@
---
import { getCollection, render } from 'astro:content';
import CoralComments from '@/components/CoralComments.astro';
import DefaultLayout from '@/layouts/DefaultLayout.astro';
import { BlogPost } from '@/components/sections/blog-post';
import NewsletterSignup from '@/components/sections/newsletter-signup';
@ -16,6 +17,9 @@ export async function getStaticPaths() {
const post = Astro.props;
const { Content } = await render(post);
const postSlug = post.id.replace(/\/index$/, '');
const coralStoryID = `${ACTIVE_BLOG_SITE.key}:${postSlug}`;
const coralStoryURL = new URL(`/${postSlug}/`, ACTIVE_BLOG_SITE.url).toString();
---
<DefaultLayout title={`${post.data.title} | ${SITE_TITLE}`} description={post.data.description}>
@ -25,5 +29,6 @@ const { Content } = await render(post);
</BlogPost>
</div>
<CoralComments storyID={coralStoryID} storyURL={coralStoryURL} />
<NewsletterSignup client:load />
</DefaultLayout>