mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-01 16:00:29 +02:00
docs: use "npx create-docusaurus" for init (#5797)
This commit is contained in:
parent
2e85848487
commit
ca5d70d7fb
18 changed files with 30 additions and 30 deletions
|
@ -52,7 +52,7 @@ The end result can be seen at [docusaurus-crowdin-example.netlify.app](https://d
|
|||
Initialize a new Docusaurus site:
|
||||
|
||||
```bash
|
||||
npm init docusaurus@latest website classic
|
||||
npx create-docusaurus@latest website classic
|
||||
```
|
||||
|
||||
Add the site configuration for the French language:
|
||||
|
|
|
@ -39,7 +39,7 @@ This is a walk-through of using Git to translate a newly initialized English Doc
|
|||
Initialize a new Docusaurus site:
|
||||
|
||||
```bash
|
||||
npm init docusaurus@latest website classic
|
||||
npx create-docusaurus@latest website classic
|
||||
```
|
||||
|
||||
Add the site configuration for the French language:
|
||||
|
|
|
@ -8,7 +8,7 @@ This tutorial will walk you through the basis of the **Docusaurus i18n system**.
|
|||
|
||||
We will add **French** translations to a **newly initialized English Docusaurus website**.
|
||||
|
||||
Initialize a new site with `npm init docusaurus@latest website classic` (like [this one](https://github.com/facebook/docusaurus/tree/main/examples/classic)).
|
||||
Initialize a new site with `npx create-docusaurus@latest website classic` (like [this one](https://github.com/facebook/docusaurus/tree/main/examples/classic)).
|
||||
|
||||
## Configure your site {#configure-your-site}
|
||||
|
||||
|
|
|
@ -23,13 +23,13 @@ Use **[docusaurus.new](https://docusaurus.new)** to test Docusaurus immediately
|
|||
The easiest way to install Docusaurus is to use the command line tool that helps you scaffold a skeleton Docusaurus website. You can run this command anywhere in a new empty repository or within an existing repository, it will create a new directory containing the scaffolded files.
|
||||
|
||||
```bash
|
||||
npm init docusaurus@latest [name] [template]
|
||||
npx create-docusaurus@latest [name] [template]
|
||||
```
|
||||
|
||||
Example:
|
||||
|
||||
```bash
|
||||
npm init docusaurus@latest website classic
|
||||
npx create-docusaurus@latest website classic
|
||||
```
|
||||
|
||||
If you do not specify `name` or `template`, it will prompt you for them. We recommend the `classic` template so that you can get started quickly, and it contains features found in Docusaurus 1. The `classic` template contains `@docusaurus/preset-classic` which includes standard documentation, a blog, custom pages, and a CSS framework (with dark mode support). You can get up and running extremely quickly with the classic template and customize things later on when you have gained more familiarity with Docusaurus.
|
||||
|
@ -37,19 +37,19 @@ If you do not specify `name` or `template`, it will prompt you for them. We reco
|
|||
**[FB-Only]:** If you are setting up a new Docusaurus website for a Facebook open source project, use the `facebook` template instead, which comes with some useful Facebook-specific defaults:
|
||||
|
||||
```bash
|
||||
npm init docusaurus@latest my-website facebook
|
||||
npx create-docusaurus@latest my-website facebook
|
||||
```
|
||||
|
||||
If you want to skip installing dependencies, use the `--skip-install` option, like the following:
|
||||
|
||||
```bash
|
||||
npm init docusaurus@latest my-website classic -- --skip-install
|
||||
npx create-docusaurus@latest my-website classic --skip-install
|
||||
```
|
||||
|
||||
You can also use the template's TypeScript variant by passing the `--typescript` flag.
|
||||
|
||||
```bash
|
||||
npm init docusaurus@latest my-website classic -- --typescript
|
||||
npx create-docusaurus@latest my-website classic --typescript
|
||||
```
|
||||
|
||||
## Project structure {#project-structure}
|
||||
|
|
|
@ -26,7 +26,7 @@ Create a new Docusaurus site and follow the **very short** embedded tutorial.
|
|||
Install [Node.js](https://nodejs.org/en/download/) and create a new Docusaurus site:
|
||||
|
||||
```bash
|
||||
npm init docusaurus@latest my-website classic
|
||||
npx create-docusaurus@latest my-website classic
|
||||
```
|
||||
|
||||
Start the site:
|
||||
|
|
|
@ -10,7 +10,7 @@ Docusaurus is written in TypeScript, and provides first-class TypeScript support
|
|||
Docusaurus supports writing and using TypeScript theme components. If the init template provides a Typescript variant, you can directly initialize a site with full TypeScript support by using the `--typescript` flag.
|
||||
|
||||
```bash
|
||||
npm init docusaurus@latest my-website classic -- --typescript
|
||||
npx create-docusaurus@latest my-website classic --typescript
|
||||
```
|
||||
|
||||
Below are some guides on how to migrate an existing project to TypeScript.
|
||||
|
|
|
@ -51,7 +51,7 @@ The end result can be seen at [docusaurus-crowdin-example.netlify.app](https://d
|
|||
Initialize a new Docusaurus site:
|
||||
|
||||
```bash
|
||||
npm init docusaurus@latest website classic
|
||||
npx create-docusaurus@latest website classic
|
||||
```
|
||||
|
||||
Add the site configuration for the French language:
|
||||
|
|
|
@ -39,7 +39,7 @@ This is a walk-through of using Git to translate a newly initialized English Doc
|
|||
Initialize a new Docusaurus site:
|
||||
|
||||
```bash
|
||||
npm init docusaurus@latest website classic
|
||||
npx create-docusaurus@latest website classic
|
||||
```
|
||||
|
||||
Add the site configuration for the French language:
|
||||
|
|
|
@ -8,7 +8,7 @@ This tutorial will walk you through the basis of the **Docusaurus i18n system**.
|
|||
|
||||
We will add **French** translations to a **newly initialized English Docusaurus website**.
|
||||
|
||||
Initialize a new site with `npm init docusaurus@latest website classic` (like [this one](https://github.com/facebook/docusaurus/tree/main/examples/classic)).
|
||||
Initialize a new site with `npx create-docusaurus@latest website classic` (like [this one](https://github.com/facebook/docusaurus/tree/main/examples/classic)).
|
||||
|
||||
## Configure your site {#configure-your-site}
|
||||
|
||||
|
|
|
@ -23,13 +23,13 @@ Use **[docusaurus.new](https://docusaurus.new)** to test Docusaurus immediately
|
|||
The easiest way to install Docusaurus is to use the command line tool that helps you scaffold a skeleton Docusaurus website. You can run this command anywhere in a new empty repository or within an existing repository, it will create a new directory containing the scaffolded files.
|
||||
|
||||
```bash
|
||||
npm init docusaurus@latest [name] [template]
|
||||
npx create-docusaurus@latest [name] [template]
|
||||
```
|
||||
|
||||
Example:
|
||||
|
||||
```bash
|
||||
npm init docusaurus@latest website classic
|
||||
npx create-docusaurus@latest website classic
|
||||
```
|
||||
|
||||
If you do not specify `name` or `template`, it will prompt you for them. We recommend the `classic` template so that you can get started quickly, and it contains features found in Docusaurus 1. The `classic` template contains `@docusaurus/preset-classic` which includes standard documentation, a blog, custom pages, and a CSS framework (with dark mode support). You can get up and running extremely quickly with the classic template and customize things later on when you have gained more familiarity with Docusaurus.
|
||||
|
@ -37,19 +37,19 @@ If you do not specify `name` or `template`, it will prompt you for them. We reco
|
|||
**[FB-Only]:** If you are setting up a new Docusaurus website for a Facebook open source project, use the `facebook` template instead, which comes with some useful Facebook-specific defaults:
|
||||
|
||||
```bash
|
||||
npm init docusaurus@latest my-website facebook
|
||||
npx create-docusaurus@latest my-website facebook
|
||||
```
|
||||
|
||||
If you want to skip installing dependencies, use the `--skip-install` option, like the following:
|
||||
|
||||
```bash
|
||||
npm init docusaurus@latest my-website classic --skip-install
|
||||
npx create-docusaurus@latest my-website classic --skip-install
|
||||
```
|
||||
|
||||
You can also use the template's TypeScript variant by passing the `--typescript` flag.
|
||||
|
||||
```bash
|
||||
npm init docusaurus@latest my-website classic --typescript
|
||||
npx create-docusaurus@latest my-website classic --typescript
|
||||
```
|
||||
|
||||
## Project structure {#project-structure}
|
||||
|
|
|
@ -26,7 +26,7 @@ Create a new Docusaurus site and follow the **very short** embedded tutorial.
|
|||
Install [Node.js](https://nodejs.org/en/download/) and create a new Docusaurus site:
|
||||
|
||||
```bash
|
||||
npm init docusaurus@latest my-website classic
|
||||
npx create-docusaurus@latest my-website classic
|
||||
```
|
||||
|
||||
Start the site:
|
||||
|
|
|
@ -10,7 +10,7 @@ Docusaurus is written in TypeScript, and provides first-class TypeScript support
|
|||
Docusaurus supports writing and using TypeScript theme components. If the init template provides a Typescript variant, you can directly initialize a site with full TypeScript support by using the `--typescript` flag.
|
||||
|
||||
```bash
|
||||
npm init docusaurus@latest my-website classic --typescript
|
||||
npx create-docusaurus@latest my-website classic --typescript
|
||||
```
|
||||
|
||||
Below are some guides on how to migrate an existing project to TypeScript.
|
||||
|
|
|
@ -52,7 +52,7 @@ The end result can be seen at [docusaurus-crowdin-example.netlify.app](https://d
|
|||
Initialize a new Docusaurus site:
|
||||
|
||||
```bash
|
||||
npm init docusaurus@latest website classic
|
||||
npx create-docusaurus@latest website classic
|
||||
```
|
||||
|
||||
Add the site configuration for the French language:
|
||||
|
|
|
@ -39,7 +39,7 @@ This is a walk-through of using Git to translate a newly initialized English Doc
|
|||
Initialize a new Docusaurus site:
|
||||
|
||||
```bash
|
||||
npm init docusaurus@latest website classic
|
||||
npx create-docusaurus@latest website classic
|
||||
```
|
||||
|
||||
Add the site configuration for the French language:
|
||||
|
|
|
@ -8,7 +8,7 @@ This tutorial will walk you through the basis of the **Docusaurus i18n system**.
|
|||
|
||||
We will add **French** translations to a **newly initialized English Docusaurus website**.
|
||||
|
||||
Initialize a new site with `npm init docusaurus@latest website classic` (like [this one](https://github.com/facebook/docusaurus/tree/main/examples/classic)).
|
||||
Initialize a new site with `npx create-docusaurus@latest website classic` (like [this one](https://github.com/facebook/docusaurus/tree/main/examples/classic)).
|
||||
|
||||
## Configure your site {#configure-your-site}
|
||||
|
||||
|
|
|
@ -23,13 +23,13 @@ Use **[docusaurus.new](https://docusaurus.new)** to test Docusaurus immediately
|
|||
The easiest way to install Docusaurus is to use the command line tool that helps you scaffold a skeleton Docusaurus website. You can run this command anywhere in a new empty repository or within an existing repository, it will create a new directory containing the scaffolded files.
|
||||
|
||||
```bash
|
||||
npm init docusaurus@latest [name] [template]
|
||||
npx create-docusaurus@latest [name] [template]
|
||||
```
|
||||
|
||||
Example:
|
||||
|
||||
```bash
|
||||
npm init docusaurus@latest website classic
|
||||
npx create-docusaurus@latest website classic
|
||||
```
|
||||
|
||||
If you do not specify `name` or `template`, it will prompt you for them. We recommend the `classic` template so that you can get started quickly, and it contains features found in Docusaurus 1. The `classic` template contains `@docusaurus/preset-classic` which includes standard documentation, a blog, custom pages, and a CSS framework (with dark mode support). You can get up and running extremely quickly with the classic template and customize things later on when you have gained more familiarity with Docusaurus.
|
||||
|
@ -37,19 +37,19 @@ If you do not specify `name` or `template`, it will prompt you for them. We reco
|
|||
**[FB-Only]:** If you are setting up a new Docusaurus website for a Facebook open source project, use the `facebook` template instead, which comes with some useful Facebook-specific defaults:
|
||||
|
||||
```bash
|
||||
npm init docusaurus@latest my-website facebook
|
||||
npx create-docusaurus@latest my-website facebook
|
||||
```
|
||||
|
||||
If you want to skip installing dependencies, use the `--skip-install` option, like the following:
|
||||
|
||||
```bash
|
||||
npm init docusaurus@latest my-website classic -- --skip-install
|
||||
npx create-docusaurus@latest my-website classic --skip-install
|
||||
```
|
||||
|
||||
You can also use the template's TypeScript variant by passing the `--typescript` flag.
|
||||
|
||||
```bash
|
||||
npm init docusaurus@latest my-website classic -- --typescript
|
||||
npx create-docusaurus@latest my-website classic --typescript
|
||||
```
|
||||
|
||||
## Project structure {#project-structure}
|
||||
|
|
|
@ -26,7 +26,7 @@ Create a new Docusaurus site and follow the **very short** embedded tutorial.
|
|||
Install [Node.js](https://nodejs.org/en/download/) and create a new Docusaurus site:
|
||||
|
||||
```bash
|
||||
npm init docusaurus@latest my-website classic
|
||||
npx create-docusaurus@latest my-website classic
|
||||
```
|
||||
|
||||
Start the site:
|
||||
|
|
|
@ -10,7 +10,7 @@ Docusaurus is written in TypeScript, and provides first-class TypeScript support
|
|||
Docusaurus supports writing and using TypeScript theme components. If the init template provides a Typescript variant, you can directly initialize a site with full TypeScript support by using the `--typescript` flag.
|
||||
|
||||
```bash
|
||||
npm init docusaurus@latest my-website classic -- --typescript
|
||||
npx create-docusaurus@latest my-website classic --typescript
|
||||
```
|
||||
|
||||
Below are some guides on how to migrate an existing project to TypeScript.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue