From fcb5dddc161a32b98153c075eb090e88e6c81314 Mon Sep 17 00:00:00 2001 From: Junseong Park <39112954+jsparkdev@users.noreply.github.com> Date: Fri, 11 Apr 2025 12:47:23 +0900 Subject: [PATCH] i18n(ko-KR): update `overrides.mdx` --- .../docs/ko/config-reference/overrides.mdx | 77 +++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 src/content/docs/ko/config-reference/overrides.mdx diff --git a/src/content/docs/ko/config-reference/overrides.mdx b/src/content/docs/ko/config-reference/overrides.mdx new file mode 100644 index 00000000..1a7607ab --- /dev/null +++ b/src/content/docs/ko/config-reference/overrides.mdx @@ -0,0 +1,77 @@ +--- +i18nReady: true +title: 재정의 +description: StudioCMSOptions 재정의 참조 페이지 +sidebar: + order: 2 +--- + +import ReadMore from '~/components/ReadMore.astro'; + +StudioCMS 통합 구성 옵션 스키마 참조 + +```ts twoslash title="studiocms.config.mjs" +import { defineStudioCMSConfig } from 'studiocms/config'; +// ---cut--- +export default defineStudioCMSConfig({ + overrides: { + CustomImageOverride: 'src/components/CustomImage.astro', + FormattedDateOverride: 'src/components/FormattedDate.astro', + }, +}); +``` + +## `CustomImageOverride` + +`CustomImageOverride`는 사용자 정의 이미지 컴포넌트의 경로를 결정하는 데 사용되는 문자열입니다. + +- **타입:** `string` +- **기본값:** `undefined` + +### 사용법 + +```ts twoslash {3} title="studiocms.config.mjs" +import { defineStudioCMSConfig } from 'studiocms/config'; +// ---cut--- +export default defineStudioCMSConfig({ + overrides: { + CustomImageOverride: 'src/components/CustomImage.astro', + }, +}) +``` + +## `FormattedDateOverride` + +`FormattedDateOverride`는 사용자 정의 날짜 컴포넌트의 경로를 결정하는 데 사용되는 문자열입니다. + +- **타입:** `string` +- **기본값:** `undefined` + +### 사용법 + +```ts twoslash {3} title="studiocms.config.mjs" +import { defineStudioCMSConfig } from 'studiocms/config'; +// ---cut--- +export default defineStudioCMSConfig({ + overrides: { + FormattedDateOverride: 'src/components/FormattedDate.astro', + }, +}) +``` + +### 기본 컴포넌트 + +```astro title="FormattedDate.astro" +--- +import config from 'studiocms:config'; + +interface Props { + date: Date; +} + +const datetime = Astro.props.date.toISOString(); +const formattedDate = Astro.props.date.toLocaleDateString(config.dateLocale, config.dateTimeFormat); +--- + + +```