mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-09 15:17:23 +02:00
* feat: add getting started doc at classic inital templates
* fix: improve the contents of getting started page
* fix: fix slug routing
* fix: rename gettingStarted to getting-started and re-adjust the content
* feat: add markdown-features docs
* feat: add a page on how to create a simple document
* feat: add a page on how to create pages
* feat: add create a post doc
* feat: add thank you page with whats next
* feat : update sidebar.js
* feat : add introduction content
* feat : add self hosting content
* feat : add GitHub pages content
* fix : remove automatically deploying with github actions content
* feat : add deploying to netlify
* feat : add Translate your site
* add : Manage versions
* fix : formatted docs with prettier
* Revert "fix : formatted docs with prettier"
This reverts commit af8c0b48
* run prettier to init templates with fixes
* complete new init template
* rename manage-docs-versions
* change wording
* refresh config file
* rework init template homepage
* minor changes
Co-authored-by: Lisa Chandra <52909743+lisa761@users.noreply.github.com>
Co-authored-by: Javid <singularity.javid@gmail.com>
Co-authored-by: ShinteiMai <stevenhanselgo@gmail.com>
Co-authored-by: slorber <lorber.sebastien@gmail.com>
1.2 KiB
1.2 KiB
title |
---|
Manage Docs Versions |
Docusaurus can manage multiple versions of your docs.
Create a docs version
Release a version 1.0 of your project:
npm run docusaurus docs:version 1.0
The docs
directory is copied into versioned_docs/version-1.0
and versions.json
is created.
Your docs now have 2 versions:
1.0
athttp://localhost:3000/docs/
for the version 1.0 docscurrent
athttp://localhost:3000/docs/next/
for the upcoming, unreleased docs
Add a Version Dropdown
To navigate seamlessly across versions, add a version dropdown.
Modify the docusaurus.config.js
file:
module.exports = {
themeConfig: {
navbar: {
items: [
// highlight-start
{
type: 'docsVersionDropdown',
},
// highlight-end
],
},
},
};
The docs version dropdown appears in your navbar:
Update an existing version
It is possible to edit versioned docs in their respective folder:
versioned_docs/version-1.0/hello.md
updateshttp://localhost:3000/docs/hello
docs/hello.md
updateshttp://localhost:3000/docs/next/hello