From dea594c6dda0f84ee3ebf6982ea1c98ff760bf71 Mon Sep 17 00:00:00 2001 From: Yasutake Yohei <61961825+yasutakeyohei@users.noreply.github.com> Date: Tue, 15 Sep 2026 22:01:29 +0900 Subject: SocialShare: X投稿のキャプションをページごとに生成 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/starlight/Footer.astro | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/components/starlight') diff --git a/src/components/starlight/Footer.astro b/src/components/starlight/Footer.astro index 7c3871c..5b59d09 100644 --- a/src/components/starlight/Footer.astro +++ b/src/components/starlight/Footer.astro @@ -5,10 +5,17 @@ import Pagination from 'virtual:starlight/components/Pagination'; import config from 'virtual:starlight/user-config'; import { Icon } from '@astrojs/starlight/components'; import SocialShare from '../SocialShare.astro'; +import { shareCaption } from '../../utils/share-caption'; + +const route = Astro.locals.starlightRoute; +const caption = shareCaption( + route.entry?.slug || route.id || '', + route.entry?.data?.title, +); ---