aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--.zed/AGENTS.md29
-rw-r--r--src/components/starlight/SocialIcons.astro25
2 files changed, 43 insertions, 11 deletions
diff --git a/.zed/AGENTS.md b/.zed/AGENTS.md
index 44677a5..dc601f0 100644
--- a/.zed/AGENTS.md
+++ b/.zed/AGENTS.md
@@ -198,6 +198,35 @@ import Partial from './../../_partial.mdx';
## コミットメッセージ
- **コミットメッセージは必ず日本語で書く**
+---
+
+# Q&A 構造化と AI 向け対応
+
+## 一般質問ページの Q&A 構造化
+
+一般質問ページでは、Markdown の表(`| 質問 | 答弁概要 |`)を**直接書かない**。
+代わりに `QuestionSummary` コンポーネントを使用する。
+
+```mdx
+import QuestionSummary from '@/components/QuestionSummary.astro';
+
+<QuestionSummary
+ headline="ページのタイトル"
+ about="主題タグ"
+ datePublished="2025-06-06"
+ qa={[
+ { question: "① 質問文", answer: "答弁テキスト", anchor: "-見出し名" },
+ ]}
+/>
+```
+
+- 表の更新が必要なときは `qa` 配列だけを編集すれば、表表示と JSON-LD が自動で同期される
+
+## AI 向けファイル
+- `public/llms.txt` — AI 向けサイトマップ。ページ追加時はここにも追記する
+- `dist/llms-full.txt` — ビルド時に全 MDX 本文を結合して自動生成される(手動編集不要)
+- `scripts/generate-llms-full.mjs` — `llms-full.txt` 生成スクリプト
+
## 一括削除の禁止
- `rm -rf .` や `rm -rf *`、およびそれに類する全ファイル削除コマンドは**絶対に実行しない**
- `git rm -rf .` も同様に禁止
diff --git a/src/components/starlight/SocialIcons.astro b/src/components/starlight/SocialIcons.astro
index 4cceb9a..dbb863e 100644
--- a/src/components/starlight/SocialIcons.astro
+++ b/src/components/starlight/SocialIcons.astro
@@ -3,31 +3,28 @@ import config from "virtual:starlight/user-config";
const links = config.social || [];
-// Built-in SVG icons (replacing Starlight's Icon component for social links)
+// Built-in SVG icons for social links
const BUILTIN: Record<string, string> = {
"x.com":
'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 4l11.733 16h4.267l-11.733 -16z"/><path d="M4 20l6.768 -6.768m2.46 -2.46L20 4"/></svg>',
"code-branch":
'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="6" cy="6" r="2.5"/><circle cx="6" cy="18" r="2.5"/><line x1="6" y1="8.5" x2="6" y2="15.5"/><path d="M6 12 L18 8"/><circle cx="18" cy="6" r="2.5"/></svg>',
};
-
-// CGit 専用アイコン(cgit.yasutakeyohei.com の favicon に基づく)
-const CGIT_SVG =
- '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="7" cy="7" r="3"/><circle cx="7" cy="17" r="3"/><line x1="7" y1="10" x2="7" y2="14"/><path d="M7 12h6a3 3 0 0 0 3-3V7"/><circle cx="17" cy="7" r="3"/></svg>';
---
{
links.length > 0 && (
<>
- {links.map(({ label, href, icon }) => {
- const svg = label === "CGit" ? CGIT_SVG : (BUILTIN[String(icon)] || BUILTIN["code-branch"]);
- return (
+ {links.map(({ label, href }) => (
<a href={href} rel="me" class="sl-flex" title={label}>
<span class="sr-only">{label}</span>
- <span class="sl-social-icon" set:html={svg} />
+ {label === "CGit" ? (
+ <span class="sl-social-text">cgit</span>
+ ) : (
+ <span class="sl-social-icon" set:html={BUILTIN["code-branch"]} />
+ )}
</a>
- );
- })}
+ ))}
</>
)
}
@@ -47,5 +44,11 @@ const CGIT_SVG =
height: 1rem;
display: block;
}
+ .sl-social-text {
+ font-size: 0.8rem;
+ font-weight: 700;
+ line-height: 1;
+ font-family: var(--__sl-font-mono, monospace);
+ }
}
</style>