文档贡献指南
本地开发
本文档站采用 Docusaurus 构建。
要求
安装
yarn
本地开发
yarn start
该命令启动本地开发服务并打开浏览器窗口。大多数更改都会实时反映,无需重启服务器。
构建
yarn build
该命令会在 build
目录中生成静态内容,这些静态内容用户网站托管服务。
创建新文档
创建您的第一个文档
在 docs/hello.md
中创建一个 Markdown 文件:
docs/hello.md
# Hello
This is my **first Docusaurus document**!
新页面就会在 http://localhost:3000/docs/hello 中被看到。
配置侧边栏
Docusaurus 会自动从 docs
目录中创建侧边栏。
添加元数据以自定义侧边栏标签和位置:
docs/hello.md
---
sidebar_label: 'Hi!'
sidebar_position: 3
---
# Hello
This is my **first Docusaurus document**!