You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
vitepress/v1/assets/ko_guide_frontmatter.md.bQV...

17 lines
5.9 KiB

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

import{_ as a,c as i,ag as t,o as e}from"./chunks/framework.C1C4sYC0.js";const c=JSON.parse('{"title":"전문","description":"","frontmatter":{},"headers":[],"relativePath":"ko/guide/frontmatter.md","filePath":"ko/guide/frontmatter.md","lastUpdated":1723033845000}'),n={name:"ko/guide/frontmatter.md"};function l(p,s,r,h,k,d){return e(),i("div",null,s[0]||(s[0]=[t(`<h1 id="frontmatter" tabindex="-1">전문 <a class="header-anchor" href="#frontmatter" aria-label="Permalink to &quot;전문 {#frontmatter}&quot;"></a></h1><h2 id="usage" tabindex="-1">사용법 <a class="header-anchor" href="#usage" aria-label="Permalink to &quot;사용법 {#usage}&quot;"></a></h2><p>VitePress는 모든 마크다운 파일에서 YAML 전문(frontmatter)을 지원하며, <a href="https://github.com/jonschlinkert/gray-matter" target="_blank" rel="noreferrer">gray-matter</a>로 이를 파싱합니다. 전문은 마크다운 파일의 맨 위에 있어야 하며(모든 엘리먼트 포함 <code>&lt;script&gt;</code> 태그 이전), 세 개의 대시 라인 사이에 유효한 YAML 형태로 작성되어야 합니다. 예:</p><div class="language-md vp-adaptive-theme"><button title="코드 복사" class="copy"></button><span class="lang">md</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">---</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">title</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">VitePress로 문서 작성하기</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">editLink</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">true</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">---</span></span></code></pre></div><p>많은 사이트 또는 기본 테마 구성 옵션은 전문에 해당 옵션이 있습니다. 전문을 사용하여 현재 페이지에 대한 특정 동작을 재정의할 수 있습니다. 자세한 내용은 <a href="./../reference/frontmatter-config">전문 구성 레퍼런스</a>를 참고하세요.</p><p>또한 페이지에서 동적 Vue 표현식에 사용할 커스텀 전문 데이터를 정의할 수도 있습니다.</p><h2 id="accessing-frontmatter-data" tabindex="-1">전문 데이터에 접근하기 <a class="header-anchor" href="#accessing-frontmatter-data" aria-label="Permalink to &quot;전문 데이터에 접근하기 {#accessing-frontmatter-data}&quot;"></a></h2><p>전문 데이터는 특별한 <code>$frontmatter</code> 전역 변수를 통해 접근할 수 있습니다:</p><p>다음은 마크다운 파일에서 이를 사용하는 예입니다:</p><div class="language-md vp-adaptive-theme"><button title="코드 복사" class="copy"></button><span class="lang">md</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">---</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">title</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">VitePress로 문서 작성하기</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">editLink</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">true</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">---</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-light-font-weight:bold;--shiki-dark:#79B8FF;--shiki-dark-font-weight:bold;"># {{ $frontmatter.title }}</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">가이드 내용</span></span></code></pre></div><p>현재 페이지의 전문 데이터는 <a href="./../reference/runtime-api#usedata"><code>useData()</code></a> 헬퍼를 사용하여 <code>&lt;script setup&gt;</code>에서도 접근할 수 있습니다.</p><h2 id="alternative-frontmatter-formats" tabindex="-1">기타 전문 형식 <a class="header-anchor" href="#alternative-frontmatter-formats" aria-label="Permalink to &quot;기타 전문 형식 {#alternative-frontmatter-formats}&quot;"></a></h2><p>VitePress는 중괄호로 시작하고 끝나는 JSON 전문 문법도 지원합니다:</p><div class="language-json vp-adaptive-theme"><button title="코드 복사" class="copy"></button><span class="lang">json</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">---</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;title&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;해커처럼 블로깅하기&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;editLink&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">true</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">---</span></span></code></pre></div>`,14)]))}const E=a(n,[["render",l]]);export{c as __pageData,E as default};