创建文档
Create a Markdown file, greeting.md
, and place it under the docs
directory.
website # 您站点的根目录├── docs│ └── greeting.md├── src│ └── pages├── docusaurus.config.js├── ...
在文件顶部的前言中指定 id
及 title
,Docusaurus 在生成站点时将自动使用此信息。
---id: greetingtitle: 您好---
## 来自 Docusaurus 的问候
您准备好为您的开源项目创建文档网站了吗?
### 页眉
将显示于右上方的目录
这样,您的用户不用通读全文即可知晓这篇文章的主要内容。
### 仅在目录中呈现 h2 及 h3
这些页眉间的间隔合适,文章内容得以清楚呈现。
- 列表将帮助您- 阐述让用户牢记的关键点 - 您还可以将其嵌套 - 很多次
### 自定义页眉 ID {#custom-id}
使用 `{#custom-id}` 语法,您可以设置自己的页眉 ID。
浏览器中的渲染效果如下:
http://localhost:3000
Hello from Docusaurus
Are you ready to create the documentation site for your open source project?
Headers
will show up on the table of contents on the upper right
So that your users will know what this page is all about without scrolling down or even without reading too much.
Only h2 and h3 will be in the toc
The headers are well-spaced so that the hierarchy is clear.
- lists will help you
- present the key points
- that you want your users to remember
- and you may nest them
- multiple times
- and you may nest them
#
Custom id headersWith {#custom-id}
syntax you can set your own header id.