分版站点
Read up https://docusaurus.io/blog/2018/09/11/Towards-Docusaurus-2#versioning first for problems in v1's approach.
备注
The versioned docs should normally be migrated correctly by the migration CLI
Migrate your versioned_docs
front matter
Unlike v1, The Markdown header for each versioned doc is no longer altered by using version-${version}-${original_id}
as the value for the actual ID field. See scenario below for better explanation.
For example, if you have a docs/hello.md
.
---
id: hello
title: Hello, World !
---
Hi, Endilie here :)
When you cut a new version 1.0.0, in Docusaurus v1, website/versioned_docs/version-1.0.0/hello.md
looks like this:
---
id: version-1.0.0-hello
title: Hello, World !
original_id: hello
---
Hi, Endilie here :)