跳转至主内容
Version: 2.0.0-beta.9

Markdown 文档特性

Docs can use any Markdown feature, and have a few additional docs-specific Markdown features.

Markdown 前言

Markdown 有专属的前言

引用其他文档

If you want to reference another document file, you could use the relative path of the document you want to link to.

Docusaurus will convert the file path to be the final document url path (and remove the .md extension).

For example, if you are in folder/doc1.md and you want to reference folder/doc2.md, folder/subfolder/doc3.md and otherFolder/doc4.md:

I am referencing a [document](doc2.md).

Reference to another [document in a subfolder](subfolder/doc3.md).

[Relative document](../otherFolder/doc4.md) referencing works as well.
tip

It is better to use relative file paths links instead of relative links:

  • links will keep working on the GitHub interface
  • you can customize the document slugs without having to update all the links
  • a versioned doc will link to another doc of the exact same version
  • relative links are very likely to break if you update the trailingSlash config