Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i18n(ko-KR): update modified-time.mdx #9546

Merged
merged 2 commits into from
Oct 3, 2024
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
8 changes: 6 additions & 2 deletions src/content/docs/ko/recipes/modified-time.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ import PackageManagerTabs from '~/components/tabs/PackageManagerTabs.astro';

Markdown 및 MDX 파일의 프런트매터에 마지막 수정 시간을 추가하는 [remark 플러그인](https://github.com/remarkjs/remark)을 빌드하는 방법을 알아보세요. 이 속성을 사용하여 페이지에 수정된 시간을 표시합니다.

:::note[Git history 사용]
이 레시피는 리포지토리의 Git 기록을 기반으로 시간을 계산하므로 일부 배포 플랫폼에서는 정확하지 않을 수 있습니다. 호스트가 전체 Git 히스토리를 검색하지 않는 **얕은 복사**를 수행할 수 있습니다.
:::

## 레시피

<Steps>
Expand Down Expand Up @@ -54,7 +58,7 @@ Markdown 및 MDX 파일의 프런트매터에 마지막 수정 시간을 추가

파일에서 마지막으로 수정된 타임스탬프를 가져오는 데 Git을 사용하는 것이 권장되는 방법이지만 파일 시스템 수정 시간을 사용할 수도 있습니다.
이 플러그인은 `statSync`를 사용하여 파일의 `mtime` (수정 시간)을 ISO 8601 형식으로 가져옵니다. 그러면 타임스탬프가 파일의 프런트매터에 추가됩니다.

```js title="remark-modified-time.mjs"
import { statSync } from "fs";

Expand Down Expand Up @@ -143,4 +147,4 @@ Markdown 및 MDX 파일의 프런트매터에 마지막 수정 시간을 추가
</body>
</html>
```
</Steps>
</Steps>
Loading