feat: add comment

This commit is contained in:
KazooTTT
2025-02-05 22:59:35 +08:00
parent 3edaa20cc3
commit af1372b1b8
9 changed files with 610 additions and 3 deletions

View File

@ -2,7 +2,7 @@
import { type CollectionEntry, render } from "astro:content";
import FormattedDate from "@/components/FormattedDate.astro";
import type { HTMLTag, Polymorphic } from "astro/types";
import GiscusComment from "@/components/componentsBefore/GiscusComment";
type Props<Tag extends HTMLTag> = Polymorphic<{ as: Tag }> & {
note: CollectionEntry<"note">;
isPreview?: boolean | undefined;
@ -52,4 +52,5 @@ const date = note.data.date_created ?? note.data.date;
>
<Content />
</div>
{!isPreview && <GiscusComment client:load />}
</article>