From 1427bf4b507f849726a8028c81fe79832070ad3c Mon Sep 17 00:00:00 2001 From: Yasutake Yohei <61961825+yasutakeyohei@users.noreply.github.com> Date: Tue, 22 Sep 2026 13:23:46 +0900 Subject: PageTitle.astro: ページに副題(subtitle)を表示できるようにする MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Starlight のスキーマに subtitle(任意)を追加し、h1 の下に表示する。請願第19号の審査ページに副題を設定した(サイドバーには出ない)。 --- src/components/starlight/PageTitle.astro | 14 +++++++++++++- src/content.config.ts | 11 ++++++++++- src/content/docs/iinkai/r8d/1-seigan19.mdx | 1 + 3 files changed, 24 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/components/starlight/PageTitle.astro b/src/components/starlight/PageTitle.astro index 352e1c3..eba8bbd 100644 --- a/src/components/starlight/PageTitle.astro +++ b/src/components/starlight/PageTitle.astro @@ -1,5 +1,7 @@ --- import Breadcrumbs from './Breadcrumbs.astro'; + +const { title, subtitle } = Astro.locals.starlightRoute.entry.data; --- {Astro.url.pathname !== "/" && ( @@ -7,7 +9,8 @@ import Breadcrumbs from './Breadcrumbs.astro';
-

{Astro.locals.starlightRoute.entry.data.title}

+

{title}

+ {subtitle &&

{subtitle}

} )} @@ -20,5 +23,14 @@ import Breadcrumbs from './Breadcrumbs.astro'; font-weight: 600; color: var(--sl-color-white); } + + .page-subtitle { + margin-top: 0.75rem; + margin-bottom: 0; + font-size: var(--sl-text-lg); + line-height: var(--sl-line-height-headings); + font-weight: 400; + color: var(--sl-color-gray-2); + } } diff --git a/src/content.config.ts b/src/content.config.ts index 7fbcf2c..93cd3ab 100644 --- a/src/content.config.ts +++ b/src/content.config.ts @@ -1,7 +1,16 @@ import { defineCollection } from "astro:content"; +import { z } from "astro/zod"; import { docsLoader } from "@astrojs/starlight/loaders"; import { docsSchema } from "@astrojs/starlight/schema"; export const collections = { - docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }), + docs: defineCollection({ + loader: docsLoader(), + schema: docsSchema({ + extend: z.object({ + /** ページの h1 の下に表示する副題(サイドバーには出ない) */ + subtitle: z.string().optional(), + }), + }), + }), }; diff --git a/src/content/docs/iinkai/r8d/1-seigan19.mdx b/src/content/docs/iinkai/r8d/1-seigan19.mdx index ea640a0..572b18c 100644 --- a/src/content/docs/iinkai/r8d/1-seigan19.mdx +++ b/src/content/docs/iinkai/r8d/1-seigan19.mdx @@ -2,6 +2,7 @@ first: 2026-08-26 description: 令和8年8月26日の厚生委員会における請願第19号の審査まとめ。介護報酬の不適切な受給と賃金未払いをめぐり、市が監査に切り替えなかった根拠、従業員への計算の丸投げ、随意契約の更新、他の地域包括支援センターへの調査などを確認。 title: "請願第19号の審査(令和8年8月26日 厚生委員会)" +subtitle: 社会福祉法人の介護報酬の不適切受給と賃金未払いの是正を求める請願 tags: - 委員会 - 請願 -- cgit v1.3.1