diff --git a/.vitepress/ja.mts b/.vitepress/ja.mts index e3cbe476..ea046f36 100644 --- a/.vitepress/ja.mts +++ b/.vitepress/ja.mts @@ -5,30 +5,6 @@ export const ja = defineConfig({ title: "Frontend Fundamentals", description: "変更しやすいフロントエンドコードのためのガイドライン", lastUpdated: true, - head: [ - ["link", { rel: "icon", href: "/images/favicon.ico" }], - [ - "meta", - { - property: "og:image", - content: "https://static.toss.im/illusts/ff-meta.png" - } - ], - [ - "meta", - { - name: "twitter:image", - content: "https://static.toss.im/illusts/ff-meta.png" - } - ], - [ - "meta", - { - name: "twitter:card", - content: "https://static.toss.im/illusts/ff-meta.png" - } - ] - ], themeConfig: { logo: "/images/ff-symbol.svg", nav: nav(), @@ -213,7 +189,7 @@ function sidebar(): DefaultTheme.Sidebar { } export const search: DefaultTheme.LocalSearchOptions["locales"] = { - root: { + ja: { translations: { button: { buttonText: "検索", diff --git a/.vitepress/shared.mts b/.vitepress/shared.mts index 99bd8354..c3096a72 100644 --- a/.vitepress/shared.mts +++ b/.vitepress/shared.mts @@ -1,5 +1,6 @@ import { defineConfig, HeadConfig } from "vitepress"; import { search as koSearch } from "./ko.mts"; +import { search as jaSearch } from "./ja.mts"; export const shared = defineConfig({ lastUpdated: true, @@ -30,11 +31,15 @@ export const shared = defineConfig({ transformHead: ({ pageData }) => { const head: HeadConfig[] = []; - const title = pageData.frontmatter.title || pageData.title || 'Frontend Fundamentals'; - const description = pageData.frontmatter.description || pageData.description || 'Guidelines for easily modifiable frontend code'; + const title = + pageData.frontmatter.title || pageData.title || "Frontend Fundamentals"; + const description = + pageData.frontmatter.description || + pageData.description || + "Guidelines for easily modifiable frontend code"; - head.push(['meta', { property: 'og:title', content: title }]); - head.push(['meta', { property: 'og:description', content: description }]); + head.push(["meta", { property: "og:title", content: title }]); + head.push(["meta", { property: "og:description", content: description }]); return head; }, @@ -50,7 +55,8 @@ export const shared = defineConfig({ provider: "local", options: { locales: { - ...koSearch + ...koSearch, + ...jaSearch } } }, diff --git a/ja/code/examples/user-policy.md b/ja/code/examples/user-policy.md index 5e7b9e60..bc58323e 100644 --- a/ja/code/examples/user-policy.md +++ b/ja/code/examples/user-policy.md @@ -93,7 +93,7 @@ function Page() { function Page() { const user = useUser(); const policy = { - admin: { canInvite: true, canRead: true }, + admin: { canInvite: true, canView: true }, viewer: { canInvite: false, canView: true } }[user.role];