diff options
| author | Florian Merz <me@fiji-flo.de> | 2021-02-11 14:48:24 +0100 |
|---|---|---|
| committer | Florian Merz <me@fiji-flo.de> | 2021-02-11 14:48:24 +0100 |
| commit | ee778d6eea54935fd05022e0ba8c49456003381a (patch) | |
| tree | 151a4cef804d8823cc8fc753b8edc693b7078241 /files/ko/mdn/structures | |
| parent | 8260a606c143e6b55a467edf017a56bdcd6cba7e (diff) | |
| download | translated-content-ee778d6eea54935fd05022e0ba8c49456003381a.tar.gz translated-content-ee778d6eea54935fd05022e0ba8c49456003381a.tar.bz2 translated-content-ee778d6eea54935fd05022e0ba8c49456003381a.zip | |
unslug ko: move
Diffstat (limited to 'files/ko/mdn/structures')
| -rw-r--r-- | files/ko/mdn/structures/api_references/api_reference_sidebars/index.html | 114 | ||||
| -rw-r--r-- | files/ko/mdn/structures/api_references/index.html | 58 |
2 files changed, 0 insertions, 172 deletions
diff --git a/files/ko/mdn/structures/api_references/api_reference_sidebars/index.html b/files/ko/mdn/structures/api_references/api_reference_sidebars/index.html deleted file mode 100644 index fd8be5585d..0000000000 --- a/files/ko/mdn/structures/api_references/api_reference_sidebars/index.html +++ /dev/null @@ -1,114 +0,0 @@ ---- -title: API 레퍼런스의 사이드바 -slug: MDN/Structures/API_references/API_reference_sidebars -translation_of: MDN/Structures/API_references/API_reference_sidebars ---- -<div>{{MDNSidebar}}</div> - -<p class="summary">API 레퍼런스 문서에는 수정 가능한 사이드바 를 추가할 수 있습니다. 이 사이드바에 인터페이스, 튜토리얼, 혹은 API와 관련된 자료 링크를 노출합니다. 그 사용법을 설명합니다. </p> - -<h2 id="뭘_해야_하나요">뭘 해야 하나요?</h2> - -<p>사이드바 생성은 다음 세 단계로 나뉩니다. </p> - -<ol> - <li>API 레퍼런스 페이지를 만듭니다. </li> - <li><a href="https://github.com/mdn/kumascript">KumaScript 레파지토리</a>의 GroupData.json 데이터 파일에 그 API를 위한 엔트리를 추가합니다. </li> - <li>사이드바가 필요한 페이지에 \{{APIRef}} 메크로를 추가합니다.</li> -</ol> - -<p><a href="/en-US/docs/Web/API/Fetch_API">Fetch API</a>를 샘플로 삼아서 단계별로 살펴 보겠습니다. </p> - -<h3 id="신규_API_레퍼런스_페이지_만들기">신규 API 레퍼런스 페이지 만들기</h3> - -<p>페이지에 사이드바를 추가하기 전에 여러분은 페이지를 만들어야 합니다. (자세한건 API 레퍼런스 문서에 필요한건 무엇일까요? 마이드 문서를 보세요)</p> - -<h3 id="GroupData.json에_API의_엔트리를_추가하기">GroupData.json에 API의 엔트리를 추가하기</h3> - -<p><a href="https://github.com/mdn/kumascript/blob/master/macros/GroupData.json">GroupData.json</a> 파일은 API 레퍼런스 문서의 사이드바 안에 담아야 하는 모든 데이타를 담고 있습니다. API를 파라미터로 주고 \{{APIRef}}메크로를 실행하면, GroupData.json에서 탐색해서 사이드바를 생성하고 페이지에 추가합니다. </p> - -<p>GroupData.json에 엔트리를 추가하려면 다음을 따르세요.</p> - -<ol> - <li><a href="https://github.com/">GitHub</a> 계정이 필요합니다. </li> - <li>KumaScript 레파지토리를 포크뜨고, 작업할 브랜치를 생성하고 로컬에 클론을 뜹니다. </li> - <li>생성한 브랜치로 체크아웃을 하고 작업후 오리진으로 푸시합니다. </li> - <li>MDN 팀이 리뷰할 수 있도록 풀 리퀘스트를 날려주시고, 필요하다 생각이 들면 변경 요청을 주세요.</li> -</ol> - -<p>GitHub 사용법을 잘 모르겠으면 <a href="/ko/docs/MDN/Contribute/Structures/Compatibility_tables#The_new_way_The_browser_compat_data_repo_and_dynamic_tables">호환성 테이블 가이드</a> 문서를 참고하세요. 자세한 내용이 있습니다. </p> - -<p><a href="https://github.com/mdn/kumascript/blob/master/macros/GroupData.json">GroupData.json</a>은 KumaScript 레파지토리의 macros 폴더 안에 있습니다. 파일을 열어보면 API별로 자기 내용을 가진 거대한 JSON 구조체를 볼 수 있습니다. 키는 API명이고, 값은 사이드바 링크를 생성하기 위해 정의된 하위 멤버를 담은 객체입니다. </p> - -<p><a href="/en-US/docs/Web/API/Fetch_API">Fetch API</a> 를 예로 들면 일치하는 GroupData.json의 엔트리가 다음과 같습니다. </p> - -<pre class="brush: json notranslate">"Fetch API": { - "overview": [ "Fetch API"], - "interfaces": [ "Body", - "Headers", - "Request", - "Response", - "FetchController", - "FetchObserver", - "FetchSignal", - "ObserverCallback" ], - "methods": [ "WindowOrWorkerGlobalScope.fetch()" ], - "properties": [], - "events": [] -}, -</pre> - -<p>보다시피 키 명을 "Fetch API"으로 명명 하고 있고, 하위 멤버들을 담은 객체를 가지고 있습니다. </p> - -<h4 id="GroupData_엔트리에_담긴_하위_멤버들">GroupData 엔트리에 담긴 하위 멤버들</h4> - -<p>GroupData 엔트리에 추가할 수 있는 하위 멤버 목록입니다. </p> - -<p>리스트업된 하위 멤버값 대부분은 링크걸 텍스트와 링크 생성을 위해 메인 API 색인 페이지(https://developer.mozilla.org/<em><language-code></em>/docs/Web/API) 끝에 추가될 슬러그입니다. 예를 들어 en-US 로케일에서 "Body"는 아래 링크를 만듭니다. </p> - -<pre class="brush: html notranslate"><li><a href="https://developer.mozilla.org/en-US/docs/Web/API">Body</a></li> -</pre> - -<p>몇가지 예외가 있습니다.. 예를 들어 "guides" 하위 멤버는 가이드/튜토리얼 관련 링크를 정의할 하나이상의 링크 정보(타이틀과 슬러그)를 갖고 있는데, 이경우 슬러그는 MDN 어디든 추가될 수 있도록 MDN 문서 루트(https://developer.mozilla.org/<em><language-code></em>/docs)의 끝에 추가됩니다. </p> - -<p>사용가능한 멤버들입니다. 로케일은 en-US로 가정합니다. </p> - -<ol> - <li> - <p><code>"overview"</code> — 값은 배열이고, API 오버뷰 문서의 슬러그입니다. 하나인 경우 "Fetch API"이면 다음 같은 링크를 만듭니다. <a href="/en-US/docs/Web/API/Fetch_API">https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API</a>.</p> - </li> - <li> - <p><code>"interfaces"</code> — 해당 API의 인터페이스 전체 목록을 담은 배열 입니다. 값이 "Body"이면 다음 과 같은 링크를 만듭니다. <a href="/en-US/docs/Web/API/Body">https://developer.mozilla.org/en-US/docs/Web/API/Body</a>.</p> - </li> - <li> - <p><code>"methods"</code> — the value is an array that should contain any methods the spec adds to interfaces associated with other APIs, such as instantiation methods created on {{domxref("Navigator")}} or {{domxref("Window")}}. If there are a huge number of methods, you might want to consider only listing the most popular ones, or putting them first in the list. "WindowOrWorkerGlobalScope.fetch()" results in a link being made to <a href="/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch">https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch</a>.</p> - </li> - <li> - <p><code>"properties"</code> — the value is an array that should contain all of the properties associated with the API. This can include properties that are members of interfaces defined in the API spec, and properties the API defines on other interfaces. If there are a huge number of properties, you might want to consider only listing the most popular ones, or putting them first in the list. "Headers.append" results in a link being made to <a href="/en-US/docs/Web/API/Headers/append">https://developer.mozilla.org/en-US/docs/Web/API/Headers/append</a>.</p> - </li> - <li> - <p><code>"events"</code> — the value is an array that should contain all of the events associated with the API, defined in the API spec, or elsewhere. If there are a huge number of events, you might want to consider only listing the most popular ones, or putting them first in the list. "animationstart" results in a link being made to <a href="/en-US/docs/Web/Events/animationstart">https://developer.mozilla.org/en-US/docs/Web/Events/animationstart</a>.</p> - </li> - <li> - <p><code>"guides"</code> — the value is an array containing one or more objects that define links to guides explain how to use the API. Each object contains two submembers — "url", which contains the partial URL pointing to the guide article, and "title", which defines the link test for the link. As an example, the following object:</p> - - <pre class="brush: json notranslate">{ "url": "/docs/Web/API/Detecting_device_orientation", -"title": "Detecting device orientation" }</pre> - - <p>Creates a link with the title "Detecting device orientation", which points to <a href="/en-US/docs/Web/API/Detecting_device_orientation">https://developer.mozilla.org/en-US/docs/Web/API/Detecting_device_orientation</a>.</p> - </li> -</ol> - -<h3 id="API_Submembers_and_Tags">API Submembers and Tags</h3> - -<p>Some submembers are automatically discovered from child pages, based on page tags. Pages under the top-level API are crawled each time the sidebar is rendered, and entries are automatically created for methods ("Method" tag), properties ("Property" tag), and constructors ("Constructor" tag).</p> - -<p>Submembers are automatically decorated with warning icons based on tags as well. Decorations are added for experimental ("Experimental" tag), non-standard ("Non Standard" or "Non-standard" tag), deprecated ("Deprecated" tag), or obsolete ("Obsolete" tag) submembers.</p> - -<p>Further information about tag-based processing is available <a href="https://github.com/mdn/kumascript/blob/master/macros/APIRef.ejs">in the APIRef source</a>.</p> - -<h3 id="Inserting_the_sidebar_in_your_pages">Inserting the sidebar in your pages</h3> - -<p>Once you've added an entry for your API into GroupData.json, submitted it as a pull request and had the change accepted into the main repo, you can include it in your API reference pages using the \{{APIRef}} macro, which takes the name you used for your API in GroupData as a parameter. As an example, the <a href="/en-US/docs/Web/API/WebVR_API">WebVR API</a>'s sidebar is included in its pages with the following:</p> - -<p>\{{APIRef("WebVR API")}}</p> diff --git a/files/ko/mdn/structures/api_references/index.html b/files/ko/mdn/structures/api_references/index.html deleted file mode 100644 index c521b5f4ec..0000000000 --- a/files/ko/mdn/structures/api_references/index.html +++ /dev/null @@ -1,58 +0,0 @@ ---- -title: API 레퍼런스 -slug: MDN/Structures/API_references -tags: - - API - - 가이드 - - 레퍼런스 - - 봉사 -translation_of: MDN/Structures/API_references ---- -<div>{{MDNSidebar}}</div> - -<div>{{IncludeSubnav("/en-US/docs/MDN")}}</div> - -<p class="summary">웹에서 사용 가능한 기술 중 클라이언트 측 자바스크립트 API가 차지하는 비중은 상당히 높습니다. 그렇기 때문에, MDN은 API의 기능과 사용법을 설명하는 광범위한 참조 자료를 보유하고 있습니다. 이 안내 문서는 이런 API 참고 자료를 MDN에 생성하는 방법을 설명합니다. </p> - -<h2 id="사전_준비">사전 준비</h2> - -<p>API를 문서화 하려면 다음이 가능해야 합니다. </p> - -<ol> - <li>최종 버전의 스팩: 그 API를 다루는 스팩의 단계가 W3C 최종 권고안인지, 초안인지는 관계없지만, 최종 버전의 스팩을 참조해야 합니다. 보통은 웹에서 쉽게 검색할 수 있으며, 그 스팩의 모든 버전의 문서에는 보통 최종 버전으로의 링크가 "lastest draft"등의 제목으로 걸려있습니다. </li> - <li>최신 모던 브라우저: 여러분이 문서화할 기능들은 정식 버전이 아닌 <a href="https://nightly.mozilla.org/">파이어폭스 나이틀리</a>/<a href="https://www.google.com/intl/en/chrome/browser/canary.html">크롬 카나리</a>와 같은 실험 버전에서 지원할 가능성이 높습니다. 앞서가는 실험적인 API를 문서화 한다면 더욱 이런 버전의 브라우저를 사용해야 합니다. </li> - <li>데모/블로그 글/다른 정보: 가능하면 최대한 정보를 찾아보세요. 그 API가 어떻게 동작하는지 스스로 익숙히는 좋은 출발점이 됩니다. 주 인터페이스, 프로퍼티, 메서드가 무엇인지, 주요한 유즈 케이스가 어떻게 되는지 배우고, 어떻게 그 기능을 간단시 서술할지 고민하세요. </li> - <li>기술문의 활용: API 표준화에 참여했거나 브라우저에서 그 스팩을 구현한 누군가에게 기술문의를 할 수 있는 나만의 연락처를 찾을 수 있다면 정말 좋습니다. 다음을 참고하세요. - <ul> - <li>관련 업무를 보는 회사에서 근무한다면 사내 주소록</li> - <li>그 API에 대한 토론 채널에 참여한 공개 메일링 리스트. 모질라의 <a href="https://lists.mozilla.org/listinfo/dev-platform">dev-platform</a>, <a href="https://lists.mozilla.org/listinfo/dev-webapi">dev-webapi</a> 목록, <a href="https://lists.w3.org/Archives/Public/public-webapps/">public-webapps</a> 같은 W3C 목록 참고</li> - <li>스팩 문서. 예를 들면 <a href="https://webaudio.github.io/web-audio-api/">Web Audio API 문서</a> 상단에는 저자들의 연락처가 있음.</li> - </ul> - </li> -</ol> - -<h2 id="문서_구조">문서 구조</h2> - -<dl> - <dt><a href="/ko/docs/MDN/Contribute/Structures/API_references/What_does_an_API_reference_need">API 레퍼런스 문서에 필요한 것은 무엇일까요? </a></dt> - <dd>이 문서는 완벽한 API 레퍼런스 문서에 필요한 것들을 설명합니다. </dd> - <dt><a href="/ko/docs/MDN/Contribute/Structures/Page_types">페이지 타입</a></dt> - <dd>MDN에서 반복적으로 사용되는 페이지 타입들이 있습니다. 이 문서는 그 타입들의 목적을 설명하고 신규 문서를 만들때 사용할 수 있는 템플릿 예제를 제공합니다. </dd> -</dl> - -<h2 id="페이지의_기능">페이지의 기능</h2> - -<p>API 레퍼런스 문서를 위한 페이지 기능을 생성하는 방법을 설명합니다. </p> - -<dl> - <dt><a href="/ko/docs/MDN/Contribute/Structures/API_references/API_reference_sidebars">API 레퍼런스 사이드바</a></dt> - <dd>작성한 MDN API 레퍼런스 문서에 사이드바를 추가할 때, 여러분은 API와 관련된 인터페이스 튜토리얼, 다른 자료 링크를 맘대로 출력할 수 있습니다. 이 문서는 그 방법을 설명합니다. </dd> - <dt><a href="/ko/docs/MDN/Contribute/Structures/Syntax_sections">API 문법 섹션</a></dt> - <dd>MDN 참조 문서에서 문법 섹션은 그 기능이 가지고 있는 정확한 문법을 기술한 박스형태를 띄고 있다. (어떤 매개변수가 사용가능한지, 어떤 것이 옵션인지 등) 그 문서는 레퍼런스 문서를 위한 문법 섹션 작성법에 대해 설명합니다. </dd> - <dt><a href="/ko/docs/MDN/Contribute/Structures/Code_examples">예제 코드</a></dt> - <dd>웹 플랫폼 기능 사용법을 설명하는 페이지에는 어김없이 많은 예제 코드가 있습니다. 이 문서는 페이지에 예제 코드를 추가하기 위한 각각의 가능한 메카니즘을 기술합니다. 무엇을 언제 사용해야 하는지도 함께요.</dd> - <dt><a href="/ko/docs/MDN/Contribute/Structures/Specification_tables">스펙 테이블</a></dt> - <dd>MDN의 모든 레퍼런스 페이지는 API나 기술이 정의된 스팩, 또는 그 스팩에 대한 정보를 제공해야 합니다. 이 문서는 테이블의 형태와 제작 방법을 설명합니다. </dd> - <dt><a href="/ko/docs/MDN/Contribute/Structures/Compatibility_tables">호환성 테이블</a></dt> - <dd>MDN은 오픈 웹 문서, 즉 모든 브라우저에서 공유되는 DOM, HTML, CSS, JavaScript, SVG 등과 같은 기술 문서를 위한 호환성 테이블 표준을 가지고 있습니다. 이 문서는 호환성 데이터를 MDN 페이지에 추가하는 기능 사용법을 다룹니다. </dd> -</dl> |
