创建文档
文档是 组页面 通过以下方式连接:
- a sidebar
- 上一个/下一个导航
- versioning
创建您的第一个Doc
在 docs/hello.md创建Markdown 文件:
docs/hello.md
# Hello
This is my **first Docusaurus document**!
一个新文档现在可在 [http://localhost:3000/docs/hello](http://localhost:3000/docs/hello)获取。
配置侧边栏
Docusaurus 自动从 docs 文件夹创建一个侧边栏 。
添加元数据以自定义侧边栏标签和位置:
docs/hello.md
!
也可以在 sidebars.js 中明确创建您的侧边栏:
sidebars.js
export default {
tutorialSidebar: [
'intro',
'hello',
{
type: 'category',
label: 'Tutorial',
items: ['tutorial-basics/create-a-document'],
},
],
};