Skip to content

Commit

Permalink
i18n(ko-KR): update reading-time.mdx
Browse files Browse the repository at this point in the history
  • Loading branch information
jsparkdev committed Dec 28, 2024
1 parent 775e407 commit 5ded6b6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/content/docs/ko/recipes/reading-time.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -74,20 +74,20 @@ Markdown 또는 MDX 파일의 프런트매터에 읽기 시간 속성을 추가

만약 블로그 게시물이 [콘텐츠 컬렉션](/ko/guides/content-collections/)에 저장되어 있다면, `entry.render()` 함수의 `remarkPluginFrontmatter`에 액세스하세요. 그런 다음 템플릿에서 표시하려는 위치마다 `minutesRead`를 렌더링하세요.

```astro title="src/pages/posts/[slug].astro" "const { Content, remarkPluginFrontmatter } = await entry.render();" "<p>{remarkPluginFrontmatter.minutesRead}</p>"
```astro title="src/pages/posts/[slug].astro" "const { Content, remarkPluginFrontmatter } = await render(entry);" "<p>{remarkPluginFrontmatter.minutesRead}</p>"
---
import { CollectionEntry, getCollection } from 'astro:content';
import { getCollection, render } from 'astro:content';
export async function getStaticPaths() {
const blog = await getCollection('blog');
return blog.map(entry => ({
params: { slug: entry.slug },
params: { slug: entry.id },
props: { entry },
}));
}
const { entry } = Astro.props;
const { Content, remarkPluginFrontmatter } = await entry.render();
const { Content, remarkPluginFrontmatter } = await render(entry);
---
<html>
Expand Down Expand Up @@ -115,4 +115,4 @@ Markdown 또는 MDX 파일의 프런트매터에 읽기 시간 속성을 추가
</body>
</html>
```
</Steps>
</Steps>

0 comments on commit 5ded6b6

Please sign in to comment.