From b91b03adecf39926ff2518d54082cd5612cbd695 Mon Sep 17 00:00:00 2001 From: grassblock Date: Thu, 21 Aug 2025 17:47:56 +0800 Subject: [PATCH] feat: add 'site' & 'title' to Artalk init options --- src/components/Comments.astro | 5 +++-- src/components/helper/comments/Artalk.astro | 7 ++++++- src/config.ts | 1 + src/pages/blog/[...slug].astro | 2 +- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/components/Comments.astro b/src/components/Comments.astro index c0429bc..0d19c8b 100644 --- a/src/components/Comments.astro +++ b/src/components/Comments.astro @@ -13,11 +13,12 @@ const FediverseConfig = siteConfig.comments.fediverse interface Props { mastodonLink?: string; bskyLink?: string; + pageTitle?: string; } -const { mastodonLink, bskyLink } = Astro.props; +const { mastodonLink, bskyLink, pageTitle } = Astro.props; --- -{method === 'artalk' && } +{method === 'artalk' && } {method === 'giscus' && } {(method === 'fediverse' && !FediverseConfig.renderOnServer ) && } diff --git a/src/components/helper/comments/Artalk.astro b/src/components/helper/comments/Artalk.astro index b50e275..729cd57 100644 --- a/src/components/helper/comments/Artalk.astro +++ b/src/components/helper/comments/Artalk.astro @@ -2,10 +2,13 @@ import {siteConfig} from "../../../config"; import 'artalk/Artalk.css'; const ArtalkInstanceDomain = siteConfig.comments.artalk.instanceDomain +const ArtalkInstanceSite = siteConfig.comments.artalk.site + +const { title = '' } = Astro.props; ---
-
+