Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .vitepress/config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -315,18 +315,51 @@ export default defineConfig({
footer: {
copyright: `Copyright ${new Date().getFullYear()} by Future Corporation`,
},
// UI の文言は日本語にそろえる (#464)。lang は ja で本文も見出しも日本語なのに、
// VitePress 既定のままだと "On this page" / "Previous page" / "Search" のように
// 部品ごとに英語が出る。呼び名は 1 つにする
search: {
provider: "local",
options: {
detailedView: true,
translations: {
button: {
buttonText: "検索",
buttonAriaLabel: "検索",
},
modal: {
displayDetails: "詳細を表示",
resetButtonTitle: "検索語を消す",
backButtonTitle: "検索を閉じる",
// 後ろに検索語が続く(noResultsText "<語>")
noResultsText: "見つかりませんでした:",
// いずれもキーの記号が先に出るので「◯◯で……」と読める形にする
footer: {
selectText: "で開く",
navigateText: "で移動",
closeText: "で閉じる",
},
},
},
},
},
editLink: {
pattern: repoUrl + "/edit/main/:path",
text: "このページをGitHubで編集する",
},
outline: {
level: "deep",
label: "目次",
},
docFooter: {
prev: "前のページ",
next: "次のページ",
},
returnToTopLabel: "先頭へ戻る",
sidebarMenuLabel: "メニュー",
darkModeSwitchLabel: "表示テーマ",
lightModeSwitchTitle: "ライトテーマに切り替える",
darkModeSwitchTitle: "ダークテーマに切り替える",
// 既定は英語の "Skip to content"。サイトの他の UI と同じ日本語にする (#435)
skipToContentLabel: "本文へスキップ",
nav: [
Expand Down
4 changes: 4 additions & 0 deletions .vitepress/theme/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
leading-row と同じで、読み下す文章の 1.75 とは目的が違う。行番号・強調行・
差分行も同じ変数を見るのでずれない */
--vp-code-line-height: 1.4;
/* コピー完了の文言だけは themeConfig に設定キーが無く、VitePress は
html:lang(es|fa|ko|ru|zh) にだけ訳を持っている。ja は無いので日本語の
サイトでも "Copied" が出る。共有ボタンの吹き出しと同じ言い回しにする (#464) */
--vp-code-copy-copied-text-content: "コピーしました";
}
.vp-doc .custom-block code {
color: var(--vp-c-text-1);
Expand Down