도큐멘트 만들기
도큐멘트는 페이지들의 집합입니다. 이는 다음과 같은 기능들로 묶여있습니다.
- 사이드바
- 이전/다음
- 버전 관리
첫 도큐멘트 만들기
docs/hello.md
에 새로운 마크다운 파일 생성:
docs/hello.md
# Hello
This is my **first Docusaurus document**!
이제 새로운 도큐멘트가 http://localhost:3000/docs/hello에 있습니다.
사이드바 설정하기
도큐사우러스는 docs
폴더로부터 자동으로 사이드바 생성을 합니다.
사이드바 각 항목의 표제목과 위치를 정하는 메타데이터 추가:
docs/hello.md
---
sidebar_label: '안녕!'
sidebar_position: 3
---
# 안녕
이건 내 **첫 도큐사우러스 도큐멘트**야!
sidebars.js
를 통해 명시적으로 사이드바 생성:
sidebars.js
module.exports = {
tutorialSidebar: [
'intro',
'hello',
{
type: 'category',
label: 'Tutorial',
items: ['tutorial-basics/create-a-document'],
},
],
};