mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-24 13:38:02 +02:00
Reformat, proofread and tidy up docs (#749)
This commit is contained in:
parent
33a0f309ff
commit
18c01327a3
14 changed files with 200 additions and 212 deletions
|
@ -8,7 +8,6 @@ Docusaurus provides a set of scripts to help you generate, serve, and deploy you
|
|||
* [`yarn run start`](api-commands.md#docusaurus-start-port-number): build and serve the website from a local server
|
||||
* [`yarn run examples`](api-commands.md#docusaurus-examples): create example configuration files
|
||||
|
||||
|
||||
## Running from the command line
|
||||
|
||||
The scripts can be run using either Yarn or npm. If you've already gone through our Getting Started guide, you may already be familiar with the `start` command. It's the command that tells Docusaurus to run the `docusaurus-start` script which generates the site and starts up a server, and it's usually invoked like so:
|
||||
|
@ -49,7 +48,7 @@ Docusaurus provides some default mappings to allow you to run commands following
|
|||
|
||||
<AUTOGENERATED_TABLE_OF_CONTENTS>
|
||||
|
||||
-----
|
||||
---
|
||||
|
||||
## Reference
|
||||
|
||||
|
@ -57,9 +56,9 @@ Docusaurus provides some default mappings to allow you to run commands following
|
|||
|
||||
Alias: `build`.
|
||||
|
||||
|Options|Default|Description|
|
||||
|---|---|---|
|
||||
|`--skip-image-compression`|`false`|Skip compression of image assets. You usually won't want to skip this unless your images have already been optimized.|
|
||||
| Options | Default | Description |
|
||||
| -------------------------- | ------- | --------------------------------------------------------------------------------------------------------------------- |
|
||||
| `--skip-image-compression` | `false` | Skip compression of image assets. You usually won't want to skip this unless your images have already been optimized. |
|
||||
|
||||
Generates the static website, applying translations if necessary. Useful for building the website prior to deployment.
|
||||
|
||||
|
@ -71,9 +70,9 @@ See also [`docusaurus-start`](api-commands.md#docusaurus-start).
|
|||
|
||||
Alias: `examples`
|
||||
|
||||
|Arguments|Default|Description|
|
||||
|---|---|---|
|
||||
|`<feature>`|-|Specify a feature `translations` or `versions` to generate the extra example files for that feature.|
|
||||
| Arguments | Default | Description |
|
||||
| ----------- | ------- | ---------------------------------------------------------------------------------------------------- |
|
||||
| `<feature>` | - | Specify a feature `translations` or `versions` to generate the extra example files for that feature. |
|
||||
|
||||
**Example**
|
||||
|
||||
|
@ -93,24 +92,24 @@ Alias: `publish-gh-pages`
|
|||
|
||||
The following environment variables are generally set manually by the user in the CircleCI `config.yml` file.
|
||||
|
||||
- `GIT_USER`: The git user to be associated with the deploy commit.
|
||||
- `USE_SSH`: Whether to use SSH instead of HTTPS for your connection to the GitHub repo.
|
||||
* `GIT_USER`: The git user to be associated with the deploy commit.
|
||||
* `USE_SSH`: Whether to use SSH instead of HTTPS for your connection to the GitHub repo.
|
||||
|
||||
**Example**
|
||||
**Example**
|
||||
|
||||
```bash
|
||||
GIT_USER=docusaurus-bot USE_SSH=true yarn run publish-gh-pages
|
||||
```
|
||||
```bash
|
||||
GIT_USER=docusaurus-bot USE_SSH=true yarn run publish-gh-pages
|
||||
```
|
||||
|
||||
The following environment variables are [set by CircleCI](https://circleci.com/docs/1.0/environment-variables/) during the build process.
|
||||
|
||||
- `CIRCLE_BRANCH`: The git branch associated with the commit that triggered the CI run.
|
||||
- `CI_PULL_REQUEST`: Expected to be truthy if the current CI run was triggered by a commit in a pull request.
|
||||
* `CIRCLE_BRANCH`: The git branch associated with the commit that triggered the CI run.
|
||||
* `CI_PULL_REQUEST`: Expected to be truthy if the current CI run was triggered by a commit in a pull request.
|
||||
|
||||
The following should be set by you in `siteConfig.js` as `organizationName` and `projectName`, respectively. If they are not set in your site configuration, they fall back to the [CircleCI environment](https://circleci.com/docs/1.0/environment-variables/).
|
||||
|
||||
- `CIRCLE_PROJECT_USERNAME`: The GitHub username or organization name that hosts the Git repo, e.g. "facebook".
|
||||
- `CIRCLE_PROJECT_REPONAME`: The name of the Git repo, e.g. "Docusaurus".
|
||||
* `CIRCLE_PROJECT_USERNAME`: The GitHub username or organization name that hosts the Git repo, e.g. "facebook".
|
||||
* `CIRCLE_PROJECT_REPONAME`: The name of the Git repo, e.g. "Docusaurus".
|
||||
|
||||
You can learn more about configuring automatic deployments with CircleCI in the [Publishing guide](getting-started-publishing.md).
|
||||
|
||||
|
@ -122,10 +121,10 @@ Alias: `rename-version`
|
|||
|
||||
Renames an existing version of the docs to a new version name.
|
||||
|
||||
|Arguments|Default|Description|
|
||||
|---|---|---|
|
||||
|`<currentVersion>`|-|Version to be renamed.|
|
||||
|`<newVersion>`|-|Version to be renamed to.|
|
||||
| Arguments | Default | Description |
|
||||
| ------------------ | ------- | ------------------------- |
|
||||
| `<currentVersion>` | - | Version to be renamed. |
|
||||
| `<newVersion>` | - | Version to be renamed to. |
|
||||
|
||||
**Example**
|
||||
|
||||
|
@ -143,9 +142,9 @@ Alias: `start`.
|
|||
|
||||
This script will build the static website, apply translations if necessary, and then start a local server.
|
||||
|
||||
|Options|Default|Description|
|
||||
|---|---|---|
|
||||
|`--port <number>`|`3000`|The website will be served from port 3000 by default, but if the port is taken up, Docusaurus will attempt to find an available one.|
|
||||
| Options | Default | Description |
|
||||
| ----------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `--port <number>` | `3000` | The website will be served from port 3000 by default, but if the port is taken up, Docusaurus will attempt to find an available one. |
|
||||
|
||||
---
|
||||
|
||||
|
@ -153,7 +152,7 @@ This script will build the static website, apply translations if necessary, and
|
|||
|
||||
Alias: `version`
|
||||
|
||||
Generates a new version of the docs. This will result in a new copy of your site being generated and stored in its own versioned folder. Useful for capturing snapshots of API docs that map to specific versions of your software. Accepts any string as a version number.
|
||||
Generates a new version of the docs. This will result in a new copy of your site being generated and stored in its own versioned directory. Useful for capturing snapshots of API docs that map to specific versions of your software. Accepts any string as a version number.
|
||||
|
||||
See the [Versioning guide](guides-versioning.md) to learn more.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue