Skip to content
Merged
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
227 changes: 227 additions & 0 deletions src/content/docs/ko/config-reference/dashboard.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,227 @@
---
i18nReady: true
title: 대시보드 구성
description: StudioCMSOptions dashboardConfig 참조 페이지
Comment thread
Adammatthiesen marked this conversation as resolved.
sidebar:
order: 6
---

import ReadMore from '~/components/ReadMore.astro';
Comment thread
Adammatthiesen marked this conversation as resolved.

StudioCMS 통합 구성 옵션 스키마 참조

```ts twoslash title="studiocms.config.mjs"
import { defineStudioCMSConfig } from 'studiocms/config';
// ---cut---
export default defineStudioCMSConfig({
dashboardConfig: {
dashboardEnabled: true,
dashboardRouteOverride: 'dashboard',
developerConfig: {},
faviconURL: '/favicon.svg',
inject404Route: true,
versionCheck: true,
AuthConfig: {},
},
});
```

## `dashboardEnabled`

`dashboardEnabled`는 대시보드를 활성화할지 여부를 결정하는 데 사용되는 부울입니다.

- **타입:** `boolean`
- **기본값:** `true`

### 사용법

```ts twoslash {3} title="studiocms.config.mjs"
import { defineStudioCMSConfig } from 'studiocms/config';
// ---cut---
export default defineStudioCMSConfig({
dashboardConfig: {
dashboardEnabled: true, // 기본값 - 대시보드를 활성화합니다.
}
})
```

## `DashboardRouteOverride`
Comment thread
Adammatthiesen marked this conversation as resolved.

`DashboardRouteOverride`는 대시보드의 라우트를 결정하는 데 사용되는 문자열입니다.

- **타입:** `string`
- **기본값:** `'dashboard'`

### 사용법

```ts twoslash {3} title="studiocms.config.mjs"
import { defineStudioCMSConfig } from 'studiocms/config';
// ---cut---
export default defineStudioCMSConfig({
dashboardConfig: {
dashboardRouteOverride: 'dashboard', // 기본값 - 대시보드의 라우트를 /dashboard로 설정합니다.
}
})
```

## `developerConfig`

`developerConfig`는 대시보드의 개발자 설정을 구성하는 데 사용되는 객체입니다.

### 사용법

```ts twoslash {3-5} title="studiocms.config.mjs"
import { defineStudioCMSConfig } from 'studiocms/config';
// ---cut---
export default defineStudioCMSConfig({
dashboardConfig: {
developerConfig: {
demoMode: false, // 기본값 - 데모 모드를 비활성화합니다.
},
}
})
```

## `faviconURL`

`faviconURL`은 대시보드의 파비콘 경로를 결정하는 데 사용되는 문자열입니다.

- **타입:** `string`
- **기본값:** `'/favicon.svg'`

### 사용법

```ts twoslash {3} title="studiocms.config.mjs"
import { defineStudioCMSConfig } from 'studiocms/config';
// ---cut---
export default defineStudioCMSConfig({
dashboardConfig: {
faviconURL: '/favicon.svg', // 기본값 - 대시보드의 파비콘을 설정합니다.
}
})
```

## `inject404Route`

`inject404Route`는 404 라우트를 삽입할지 여부를 결정하는 데 사용되는 부울입니다.

- **타입:** `boolean`
- **기본값:** `true`

### 사용법

```ts twoslash {3} title="studiocms.config.mjs"
import { defineStudioCMSConfig } from 'studiocms/config';
// ---cut---
export default defineStudioCMSConfig({
dashboardConfig: {
inject404Route: true, // 기본값 - 404 라우트를 삽입합니다.
}
})
```

## `versionCheck`

`versionCheck`는 버전 확인을 활성화할지 여부를 결정하는 데 사용되는 부울입니다.

- **타입:** `boolean`
- **기본값:** `true`

### 사용법

```ts twoslash {3} title="studiocms.config.mjs"
import { defineStudioCMSConfig } from 'studiocms/config';
// ---cut---
export default defineStudioCMSConfig({
dashboardConfig: {
versionCheck: true, // 기본값 - 버전 확인을 활성화합니다.
}
})
```

## `AuthConfig`

`AuthConfig`는 대시보드의 인증 설정을 구성하는 데 사용되는 객체입니다.

### 사용법

```ts twoslash {3-5} title="studiocms.config.mjs"
import { defineStudioCMSConfig } from 'studiocms/config';
// ---cut---
export default defineStudioCMSConfig({
dashboardConfig: {
AuthConfig: {
enabled: true, // 기본값 - 인증을 활성화합니다.
},
}
})
```

### `providers`

`providers`는 대시보드의 인증 제공자를 구성하는 데 사용되는 객체입니다.

- **타입:** [`AuthProviders`](#authprovider)
- **기본값:** `{}`

#### 사용법

```ts twoslash {4-11} title="studiocms.config.mjs"
import { defineStudioCMSConfig } from 'studiocms/config';
// ---cut---
export default defineStudioCMSConfig({
dashboardConfig: {
AuthConfig: {
providers: {
google: true,
github: true,
discord: true,
auth0: true,
usernameAndPassword: true,
usernameAndPasswordConfig: {},
},
},
},
})
```

#### `usernameAndPasswordConfig`

`usernameAndPasswordConfig`는 대시보드의 사용자 이름과 비밀번호 설정을 구성하는 데 사용되는 객체입니다.

- **타입:** `{ allowUserRegistration?: boolean }`
- **기본값:** `{}`

##### 사용법

```ts twoslash {5-8} title="studiocms.config.mjs"
import { defineStudioCMSConfig } from 'studiocms/config';
// ---cut---
export default defineStudioCMSConfig({
dashboardConfig: {
AuthConfig: {
providers: {
usernameAndPassword: true,
usernameAndPasswordConfig: {
allowUserRegistration: true, // 기본값 - 사용자 등록을 허용합니다.
},
},
},
},
})
```

###### `AuthProvider`
Comment thread
Adammatthiesen marked this conversation as resolved.

```ts
type AuthProviders: {
Comment thread
Adammatthiesen marked this conversation as resolved.
github?: boolean | undefined;
discord?: boolean | undefined;
google?: boolean | undefined;
auth0?: boolean | undefined;
usernameAndPassword?: boolean | undefined;
usernameAndPasswordConfig?: {
allowUserRegistration?: boolean | undefined;
} | undefined;
} | undefined
```
Loading