-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into typescript-bundle-improvements
# Conflicts: # packages/docusaurus-plugin-debug/package.json # packages/docusaurus-theme-common/package.json
- Loading branch information
Showing
140 changed files
with
11,565 additions
and
369 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
packages/docusaurus-init/templates/classic/docs/congratulations.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
title: Congratulations! | ||
--- | ||
|
||
Congratulations on making it this far! | ||
|
||
You have learned the **basics of Docusaurus** and made some changes to the **initial template**. | ||
|
||
Docusaurus has **much more to offer**! | ||
|
||
Have 5 more minutes? Take a look at **[versioning](./manage-docs-versions.md)** and **[i18n](./translate-your-site.md)**. | ||
|
||
## What's next? | ||
|
||
- Read the [official documentation](https://v2.docusaurus.io/). | ||
- Add a custom [Design and Layout](https://v2.docusaurus.io/docs/styling-layout) | ||
- Add a [search bar](https://v2.docusaurus.io/docs/search) | ||
- Find inspirations in the [Docusaurus showcase](https://v2.docusaurus.io/showcase) | ||
- Get involved in the [Docusaurus Community](https://v2.docusaurus.io/community/support) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
packages/docusaurus-init/templates/classic/docs/deploy-your-site.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
title: Deploy your site | ||
--- | ||
|
||
Docusaurus is a **static-site-generator** (also called [Jamstack](https://jamstack.org/)), and builds your site as **static HTML, JavaScript and CSS files**. | ||
|
||
## Build your site | ||
|
||
Build your site **for production**: | ||
|
||
```bash | ||
npm run build | ||
``` | ||
|
||
The static files are generated in the `build` directory. | ||
|
||
## Deploy your site | ||
|
||
Test your production build locally: | ||
|
||
```bash | ||
npm run serve | ||
``` | ||
|
||
The `build` folder is now served at `http://localhost:3000/`. | ||
|
||
You can now deploy the `build` folder **almost anywhere** easily, **for free** or very small cost (read the **[Deployment Guide](https://v2.docusaurus.io/docs/deployment)**). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
packages/docusaurus-init/templates/classic/docs/manage-docs-versions.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
--- | ||
title: Manage Docs Versions | ||
--- | ||
|
||
Docusaurus can manage multiple versions of your docs. | ||
|
||
## Create a docs version | ||
|
||
Release a version 1.0 of your project: | ||
|
||
```bash | ||
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` at `http://localhost:3000/docs/` for the version 1.0 docs | ||
- `current` at `http://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: | ||
|
||
```js title="docusaurus.config.js" | ||
module.exports = { | ||
themeConfig: { | ||
navbar: { | ||
items: [ | ||
// highlight-start | ||
{ | ||
type: 'docsVersionDropdown', | ||
}, | ||
// highlight-end | ||
], | ||
}, | ||
}, | ||
}; | ||
``` | ||
|
||
The docs version dropdown appears in your navbar: | ||
|
||
![Docs Version Dropdown](/img/tutorial/docsVersionDropdown.png) | ||
|
||
## Update an existing version | ||
|
||
It is possible to edit versioned docs in their respective folder: | ||
|
||
- `versioned_docs/version-1.0/hello.md` updates `http://localhost:3000/docs/hello` | ||
- `docs/hello.md` updates `http://localhost:3000/docs/next/hello` |
Oops, something went wrong.