Skip to content

Commit

Permalink
Merge pull request #628 from unitaryfund/giscus-comments
Browse files Browse the repository at this point in the history
Add comment section to blog posts
  • Loading branch information
cosenal authored Nov 18, 2024
2 parents c55ef0c + 1e30691 commit d18e9d4
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/components/Pages/Blog/PostComments.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<section class="giscus mx-auto mt-10 w-full"></section>

<script src="https://giscus.app/client.js"
data-repo="unitaryfund/unitary.fund"
data-repo-id="MDEwOlJlcG9zaXRvcnkxMzg1MTY4Nzk="
data-category="Blog Post Comments"
data-category-id="DIC_kwDOCEGZj84CkWc_"
data-mapping="url"
data-strict="0"
data-reactions-enabled="1"
data-emit-metadata="0"
data-input-position="bottom"
data-theme="noborder_light"
data-lang="en"
crossorigin="anonymous"
async>
</script>
2 changes: 2 additions & 0 deletions src/pages/posts/[slug].astro
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import Layout from '~/layouts/Layout.astro';
import { getCollection, getEntry } from 'astro:content';
import type { CollectionEntry } from 'astro:content';
import PostComments from '~/components/Pages/Blog/PostComments.astro';
export async function getStaticPaths() {
const blogEntries = await getCollection('blog');
Expand Down Expand Up @@ -49,5 +50,6 @@ const { title, author, day, month, year } = entry.data;
<Content />
</div>
</article>
<PostComments />
</div>
</Layout>

0 comments on commit d18e9d4

Please sign in to comment.